DataStax Extends Stargate |
Written by Nikos Vaggalis | |||
Monday, 11 October 2021 | |||
DataStax, mostly known for AstraDB the multi-cloud database based on Apache Cassandra, has announced the addition of new capabilities to its Stargate Gateway product.
Stargate is a data gateway deployed between client applications and databases. Its novelty lies in that it exposes the database layer as a multitude of APIs, that way offering flexibility to the way you expose your data. Needless to say, that's a big boon for developers. The APIs in question are the Document, REST, CQL and GraphQL. As such under the Document API you can modify and query data stored as unstructured JSON documents in collections. The REST API exposes CRUD access to data stored in Cassandra tables, while under the CQL API you can access those tables using Cassandra’s native query language CQL. Lastly, under the GraphQL API you can easily modify and query table data using GraphQL types, queries, and mutations. This happens seamlessly as when Stargate’s GraphQL API is added to an existing Cassandra deployment, it scans the database and automatically creates HTTP endpoints with GraphQL queries and mutations for the objects that it finds in the database. New database tables can also be created directly via the API. While the GraphQL API is not a new addition to Stargate, it now is being extended so that developers can create tables and define schemas in Apache Cassandra without the need to work directly with Cassandra Query Language (CQL). But what does that actually mean? How were things working before that change? I've reached out and Doug Wettlaufer, Senior Software Engineer at DataStax, kindly provided the details: Basically the GraphQL API has two modes, schema-first (also referred to as GraphQL-first) and CQL-first. In CQL-first the API feels very familiar to someone that's used CQL. You're working with keyspaces and tables. Plus this API will expose exactly what's in your existing Cassandra schema. On the other hand GraphQL-first takes a more GraphQL native approach; it instead accepts a GraphQL schema file to generate your underlying Cassandra schema. The new version adds this GraphQL-first schema approach. As such Stargate’s GraphQL API,which is built upon graphql-java, exposes the following GraphQL services over HTTP:
This functionality, however, goes beyond Cassandra - through integration with the Apollo Gateway it can interface with other databases that support GraphQL including MongoDB, MySQL and PostgreSQL, as well with data stores on AWS, Google Cloud, and Microsoft Azure. Stargate is available as part of the Astra DB cloud service and as an open source project for Apache Cassandra and DataStax Enterprise. So how far can you go seeking to add GraphQL support? Do you go as far as a dedicated GraphQL dbms like DGraph or do you easily extend your existing infrastructure through Stargate? More InformationRelated ArticlesNetflix's GraphQL for Spring Boot Graphcool Eases Your Way Into GraphQL
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |