Announcing Native Polyglot APIs in FaunaDB: GraphQL Now, CQL, SQL Forthcoming
Today’s applications require data to be modeled in various ways. Your favorite payment application not only supports real-time transactions, but also provides the ability to communicate with a network of friends. FaunaDB’s multi-model approach enables developers to model almost all types of data including relational, document, graph, and temporal paradigms. This has become very attractive to developers as they do not need to use multiple databases to address these different requirements within the same application.
At Fauna, we also understand that our developers want to use the language/s of their choice to work with their different data models. FaunaDB’s proprietary query language (FQL) is intuitive, flexible, and typesafe. FQL interaction with the database is mediated by drivers that publish embedded DSLs for most popular application languages. But as Fauna expands its user base, more and more developers are requesting different dialects that are popular for specific application use cases. We have listened to our users and are announcing support for a set of new APIs that will empower our developers and boost their productivity.
The New APIs
Developers using FaunaDB will now be able to manipulate data directly using multiple languages such as GraphQL for serverless applications, as well as CQL and SQL, which have historically been popular in the enterprise. These languages will be supported as native endpoints within FaunaDB Cloud and FaunaDB Enterprise for use on-premises, and will not require any additional software to be installed by the database client. With support for GraphQL and CQL, and later SQL, FaunaDB’s managed cloud service will become truly versatile. Serverless, multi-tenant, and multi-cloud, FaunaDB’s managed cloud will allow developers to use any of these languages to manipulate all their data, thereby unlocking new levels of productivity for serverless application development.
The Fauna Advantage
Unlike other systems that create API layers with different properties for each dialect, platform APIs in FaunaDB leverage common database capabilities to offer developers uniform access to transactional consistency, user authorization, data access, quality of service (QoS), and temporal storage.
Consistency: FaunaDB offers the highest consistency levels for its transactions. These strong consistency guarantees are automatically applied to all platform APIs.
Authorization: Unlike most databases that control access at a table level, FaunaDB provides access control at a row (document) level. This fine-grained access control is applicable to all APIs, be it GraphQL or SQL.
Shared Data Access: Data written by one API (e.g., GraphQL) can be read and modified by another API (e.g., SQL). This is a huge improvement on other database platforms that limit APIs to their specific datasets.
QoS: FaunaDB's built-in prioritization policies for concurrent workloads are enforced at the database level or with access keys. All API access automatically adheres to these QoS definitions.
Temporality: FaunaDB is the only database on the market that provides built-in temporality support with no limits on data history. With per query snapshots, any platform API (e.g., SQL) in FaunaDB can return data at any given point in time
GraphQL allows developers to specify the shape of the data they need, without requiring changes to the backend components that provide that data. This enables teams to collaborate more smoothly so that backend teams can focus on security and business logic, and front-end teams can focus on presentation and usability. In this way, GraphQL has emerged as a critical layer for universal database access.
With FaunaDB’s GraphQL API, developers no longer need to create a database schema or write time-consuming resolver functions; rather, a GraphQL schema definition file is all you need to get started. Once you import the schema definition in FaunaDB, all required database objects and functions are automatically generated. This automation tremendously boosts developer productivity as it significantly reduces the time spent in schema design and development.
A preview of FaunaDB’s GraphQL API is immediately available in FaunaDB Cloud. If you want to start using it today, please follow the getting started instructions here.
The Road Ahead
The next API in line for release is the CQL (Cassandra Query Language) API. Cassandra is a first-generation NoSQL platform that has seen adoption across many large enterprise systems because it delivers geo-distributed horizontal scalability. However, Cassandra’s inherent lack of strong data consistency and the operational overhead of running and maintaining globally distributed Cassandra clusters have been a deterrent to adoption for mission-critical and cloud-based use cases.
Support for CQL in FaunaDB will enable enterprises to rely on a single system to achieve globally consistent geo-distribution of data and scale without complexity. Stay tuned for an announcement on the CQL API in Q2.
After CQL, up next is SQL. SQL has long been the lingua franca for traditional enterprise applications. With digital transformation driving cloud adoption within the enterprise, application development continues to rely on SQL for a vast majority of enterprise workloads. However, despite this huge market need, very few cloud-centric SQL databases offer strong consistency and resilience guarantees in mainframe-like environments.
FaunaDB’s support for SQL will enable enterprises and digital businesses alike to gain from the productivity of prevalent skills in SQL while leveraging cloud platforms, without sacrificing the transactional safety that enterprises need. The SQL API will be available in the second half of CY 2019.
If you have feedback, or you would like to know more about our product, please reach me at firstname.lastname@example.org. I’d love to talk to you.
If you enjoyed this topic and want to work on systems and challenges just like this, Fauna is hiring!