Skip to content

Latest commit

 

History

History
194 lines (167 loc) · 10.9 KB

CODEBASE_OVERVIEW.md

File metadata and controls

194 lines (167 loc) · 10.9 KB

ElasticGraph Codebase Overview

ElasticGraph is designed to be modular, with a small core, and many built-in extensions that extend that core for specific use cases. This minimizes exposure to vulnerabilities, reduces bloat, and makes ongoing upgrades easier. The libraries that ship with ElasticGraph can be broken down into several categories.

Core Libraries (8 gems)

These libraries form the core backbone of ElasticGraph that is designed to run in a production deployment. Every ElasticGraph deployment will need to use all of these.

Dependency Diagram

graph LR;
    elasticgraph --> elasticgraph-support & thor
    elasticgraph-admin --> elasticgraph-datastore_core & elasticgraph-indexer & elasticgraph-schema_artifacts & elasticgraph-support & rake
    elasticgraph-datastore_core --> elasticgraph-schema_artifacts & elasticgraph-support
    elasticgraph-graphql --> elasticgraph-datastore_core & elasticgraph-schema_artifacts & graphql
    elasticgraph-indexer --> elasticgraph-datastore_core & elasticgraph-json_schema & elasticgraph-schema_artifacts & elasticgraph-support & hashdiff
    elasticgraph-json_schema --> elasticgraph-support & json_schemer
    elasticgraph-schema_artifacts --> elasticgraph-support
    elasticgraph-support --> logger
    style elasticgraph color: DodgerBlue;
    style elasticgraph-admin color: DodgerBlue;
    style elasticgraph-datastore_core color: DodgerBlue;
    style elasticgraph-graphql color: DodgerBlue;
    style elasticgraph-indexer color: DodgerBlue;
    style elasticgraph-json_schema color: DodgerBlue;
    style elasticgraph-schema_artifacts color: DodgerBlue;
    style elasticgraph-support color: DodgerBlue;
    style thor color: Red;
    style rake color: Red;
    style graphql color: Red;
    style hashdiff color: Red;
    style json_schemer color: Red;
    style logger color: Red;
click graphql href "https://rubygems.org/gems/graphql"
click hashdiff href "https://rubygems.org/gems/hashdiff"
click json_schemer href "https://rubygems.org/gems/json_schemer"
click logger href "https://rubygems.org/gems/logger"
click rake href "https://rubygems.org/gems/rake"
click thor href "https://rubygems.org/gems/thor"
Loading

AWS Lambda Integration Libraries (5 gems)

These libraries wrap the the core ElasticGraph libraries so that they can be deployed using AWS Lambda.

Dependency Diagram

graph LR;
    elasticgraph-admin_lambda --> rake & elasticgraph-admin & elasticgraph-lambda_support
    elasticgraph-graphql_lambda --> elasticgraph-graphql & elasticgraph-lambda_support
    elasticgraph-indexer_autoscaler_lambda --> elasticgraph-datastore_core & elasticgraph-lambda_support & aws-sdk-lambda & aws-sdk-sqs & aws-sdk-cloudwatch & ox
    elasticgraph-indexer_lambda --> elasticgraph-indexer & elasticgraph-lambda_support & aws-sdk-s3 & ox
    elasticgraph-lambda_support --> elasticgraph-opensearch & faraday_middleware-aws-sigv4
    style elasticgraph-admin_lambda color: DodgerBlue;
    style elasticgraph-graphql_lambda color: DodgerBlue;
    style elasticgraph-indexer_autoscaler_lambda color: DodgerBlue;
    style elasticgraph-indexer_lambda color: DodgerBlue;
    style elasticgraph-lambda_support color: DodgerBlue;
    style rake color: Red;
    style elasticgraph-admin color: Green;
    style elasticgraph-graphql color: Green;
    style elasticgraph-datastore_core color: Green;
    style aws-sdk-lambda color: Red;
    style aws-sdk-sqs color: Red;
    style aws-sdk-cloudwatch color: Red;
    style ox color: Red;
    style elasticgraph-indexer color: Green;
    style aws-sdk-s3 color: Red;
    style elasticgraph-opensearch color: Green;
    style faraday_middleware-aws-sigv4 color: Red;
click aws-sdk-cloudwatch href "https://rubygems.org/gems/aws-sdk-cloudwatch"
click aws-sdk-lambda href "https://rubygems.org/gems/aws-sdk-lambda"
click aws-sdk-s3 href "https://rubygems.org/gems/aws-sdk-s3"
click aws-sdk-sqs href "https://rubygems.org/gems/aws-sdk-sqs"
click faraday_middleware-aws-sigv4 href "https://rubygems.org/gems/faraday_middleware-aws-sigv4"
click ox href "https://rubygems.org/gems/ox"
click rake href "https://rubygems.org/gems/rake"
Loading

Extensions (4 gems)

These libraries extend ElasticGraph to provide optional but commonly needed functionality.

Dependency Diagram

graph LR;
    elasticgraph-apollo --> elasticgraph-graphql & elasticgraph-support & graphql & apollo-federation
    elasticgraph-health_check --> elasticgraph-datastore_core & elasticgraph-graphql & elasticgraph-support
    elasticgraph-query_interceptor --> elasticgraph-graphql & elasticgraph-schema_artifacts
    elasticgraph-query_registry --> elasticgraph-graphql & elasticgraph-support & graphql & rake
    style elasticgraph-apollo color: DodgerBlue;
    style elasticgraph-health_check color: DodgerBlue;
    style elasticgraph-query_interceptor color: DodgerBlue;
    style elasticgraph-query_registry color: DodgerBlue;
    style elasticgraph-graphql color: Green;
    style elasticgraph-support color: Green;
    style graphql color: Red;
    style apollo-federation color: Red;
    style elasticgraph-datastore_core color: Green;
    style elasticgraph-schema_artifacts color: Green;
    style rake color: Red;
click apollo-federation href "https://rubygems.org/gems/apollo-federation"
click graphql href "https://rubygems.org/gems/graphql"
click rake href "https://rubygems.org/gems/rake"
Loading

Datastore Adapters (2 gems)

These libraries adapt ElasticGraph to your choice of datastore (Elasticsearch or OpenSearch).

Dependency Diagram

graph LR;
    elasticgraph-elasticsearch --> elasticgraph-support & elasticsearch & faraday & faraday-retry
    elasticgraph-opensearch --> elasticgraph-support & faraday & faraday-retry & opensearch-ruby
    style elasticgraph-elasticsearch color: DodgerBlue;
    style elasticgraph-opensearch color: DodgerBlue;
    style elasticgraph-support color: Green;
    style elasticsearch color: Red;
    style faraday color: Red;
    style faraday-retry color: Red;
    style opensearch-ruby color: Red;
click elasticsearch href "https://rubygems.org/gems/elasticsearch"
click faraday href "https://rubygems.org/gems/faraday"
click faraday-retry href "https://rubygems.org/gems/faraday-retry"
click opensearch-ruby href "https://rubygems.org/gems/opensearch-ruby"
Loading

Local Development Libraries (3 gems)

These libraries are used for local development of ElasticGraph applications, but are not intended to be deployed to production (except for elasticgraph-rack). elasticgraph-rack is used to boot ElasticGraph locally but can also be used to run ElasticGraph in any rack-compatible server (including a Rails application).

Dependency Diagram

graph LR;
    elasticgraph-local --> elasticgraph-admin & elasticgraph-graphql & elasticgraph-indexer & elasticgraph-rack & elasticgraph-schema_definition & rackup & rake & webrick
    elasticgraph-rack --> elasticgraph-graphql & rack
    elasticgraph-schema_definition --> elasticgraph-graphql & elasticgraph-indexer & elasticgraph-json_schema & elasticgraph-schema_artifacts & elasticgraph-support & graphql & rake
    style elasticgraph-local color: DodgerBlue;
    style elasticgraph-rack color: DodgerBlue;
    style elasticgraph-schema_definition color: DodgerBlue;
    style elasticgraph-admin color: Green;
    style elasticgraph-graphql color: Green;
    style elasticgraph-indexer color: Green;
    style rackup color: Red;
    style rake color: Red;
    style webrick color: Red;
    style rack color: Red;
    style elasticgraph-json_schema color: Green;
    style elasticgraph-schema_artifacts color: Green;
    style elasticgraph-support color: Green;
    style graphql color: Red;
click graphql href "https://rubygems.org/gems/graphql"
click rack href "https://rubygems.org/gems/rack"
click rackup href "https://rubygems.org/gems/rackup"
click rake href "https://rubygems.org/gems/rake"
click webrick href "https://rubygems.org/gems/webrick"
Loading