UPDATED 10:00 EDT / AUGUST 22 2023

BIG DATA

Fauna’s new query language is custom-built for its serverless database

Serverless database developer Fauna Inc. today released a query language inspired by TypeScript along with new web and local development capabilities and a declarative database schema.

The company says the language is optimized for use with its cloud-delivered document-relational database management system to save developers time, improve collaboration and deliver better performance.

Fauna’s namesake distributed database is delivered via application programming interfaces. The company, which has raised more than $75 million, says its serverless architecture and distributed storage and computing structure provide both high levels of performance and security. Connectivity through an API also relieves customers of the need to maintain a database operations staff.

Fauna Query Language is described as a strongly typed database language that combines the ability to express declarative queries and functional business logic in strongly consistent transactions. Unlike imperative queries, which specify exactly what information the database should retrieve, declarative queries describe the information and let the machine figure out how to find and deliver it.

Familiar to developers

TypeScript, which is based on JavaScript, “includes a pragmatic type of system that is naturally applicable to working with data,” Tyson Trautmann, Fauna’s vice president of engineering, said in emailed comments. “FQL incorporates a similar type of system.”

Fauna said FQL will be familiar to developers who have prior knowledge of modern programming languages like TypeScript or Python. It is, by nature, composable and modular, allowing developers to create relational queries across semistructured data with strictly serialized transactions, or transactions that adhere to rules about the sequence of actions to prevent failures or inadvertent data exposure. It can be used to query within or across documents using relational operators, supports business logic and dynamically constructs JavaScript Object Notation-like result shapes that map to what the application requires.

Trautmann said FQL accounts for the fact that databases schemas are hard to predict when the data is semi-structured, as is the case with modern data lakes and lakehouses. “When you set out to build a new application you almost never have enough information to understand the shape of data that the application will store and consume, so it’s useful to start building with unstructured data to avoid getting bogged down with schema migrations,” he said.

Iterative schemas

“As an application matures, however, unstructured data can result in edge cases that break application behavior, so it is beneficial to apply structure as the shape of data hardens.” This progression, which is referred to as gradual typing, is popular in scripting languages like Perl, Python, Javascript, Ruby and PHP and is fully supported in FQL.

The ubiquitous SQL language works well when data is static but adds complexity in hybrid operational/online transaction processing scenarios, he said. It doesn’t work well with serverless models, is relatively inflexible, performs unpredictably and is limited to the relational model, Trautmann said.

“Developers cannot take advantage of the full power of the underlying database for fear that the complex, opaque nature of SQL query behavior will overwhelm their ability to understand how queries perform, and quickly address problems when they do come up,” he wrote. “Application architectures compensate by becoming more complex” and teams of administrators are required for tasks like schema migrations.

FQL bridges both worlds, Trautmann said. “Fauna had to leave SQL behind but once developers start working with FQL, they don’t miss it,” he said.

New developer experience

The new developer experience features a dashboard that minimizes context switching by listing resources such as collections and documents alongside the web code editor on a single page. An integrated web shell has multiple tabs for quick experimentation with queries and functions and leverages FQL features like rich error messages and static types.

Intelligent code completion support is available in the web shell and via a new plugin for Visual Studio Code. Suggestions are exposed to help developers write queries faster, with methods and types that make sense in the context of a query code’s cursor location.

The declarative schema language is part of an ongoing project to match the developer experience to the DevOps lifecycle. Developers can define Fauna database components in a single file that can be included alongside their existing application codebase, significantly reducing management and versioning overhead, the company said. The declarative schema language and application program interfaces integrate with popular integrated development environments and provide code checking and error prevention during development.

Image: Fauna

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU