Stargate is a framework used to customize all aspects of data access. It is deployed between client applications and a database to provide an abstraction layer that can be used to shape your data access to fit your application’s needs.
To understand the vision of this project, see the high-level architecture diagram below.
Stargate is broken up into modules that fit into three broad categories:
The diagram below shows how these modules fit together.
API extensions are responsible for defining the API, handling and converting requests to database queries, dispatching requests to persistence services, and returning and serving response to clients.
There are currently extensions for the Cassandra Query Language (CQL), and REST and GraphQL APIs for CRUD access to data in tables with many more coming soon. These extensions use both the Authentication Extensions and the Persistence Extensions.
The REST API uses the auth-api to handle token access to the endpoints that are exposed by the Jetty-based Web Server. The GraphQL API also uses the token created with REST in the GrahpQL http header request to access the endpoints. The persistence-api is used to dispatch converted requests to the underlying storage engine. In the case of the REST API, you can see what this looks like in the RowsResource.
Persistence extensions are responsible for implementing the coordination layer to execute requests passed by API services to underlying data storage instances.
The Persistence extensions are currently Cassandra-centric as Cassandra is the first database we chose to implement. The extensions for Cassandra 3.11 and 4.0 use Cassandra’s coordinator concept and code to do the majority of the work.
Specifically, when using Stargate with one of Cassandra extensions Stargate nodes:
join the Cassandra ring as a coordinator node, a node that does not store data.
mock Cassandra system tables for native driver integration.
execute requests with Cassandra storage instances using Cassandra’s internal
convert internal Cassandra objects and
ResultSetsto Stargate Datastore objects.
Authentication extensions are responsible for access control to Stargate’s APIs.
Currently there’s only an auth table-based service which stores generated access tokens in the database.