Build with Fauna
The Build section of the Fauna documentation explores topics related to developing applications with Fauna. It contains guides to developing with Fauna using Fauna Query Language (FQL), as well as reference guides to Fauna security and Fauna tools and integrations.
This page provides an introduction to several key aspects of developing with Fauna and lays the groundwork for future learning.
The HTTP service
Fauna is a data platform which is accessible to client applications via an HTTP endpoint. Fauna handles all aspects of data replication and redundancy on the server side, so developers can focus on creating efficient queries for data retrieval and manipulation. Each connection to the HTTP endpoint is a standard lightweight HTTP connection that typically lasts for the duration that a query is executing.
Fauna supports drivers in several popular languages to facilitate programmatic database querying. Each driver implements its own HTTP connection management, so client applications do not need to implement connection pools or other connection management strategies.
FQL
FQL is the main APIs for interacting with Fauna. FQL provides access to the full range of Fauna’s features and capabilities through a functional language which includes control structures and Literal return values. FQL is the basis for all the language-specific functions used for database operations in the Fauna drivers. Users can use FQL for CRUD operations as well as administration tasks such as database creation, security token management, and user-defined role creation. FQL also includes a wide variety of built-in functions for math operations, string manipulation, type conversion, and object/array manipulation.
Fauna security
Fauna’s security model supports authentication in several ways:
-
Anonymous database access with API keys.
-
Identity-based tokens.
-
Third-party authentication providers using JSON Web Tokens (JWTs).
Keys
Fauna keys provide database access to anyone with the key’s secret. Each key is associated with a role, and applications which use key access can perform any operation granted to its role.
Tokens
Tokens provide identity-based access to a Fauna database. The
Login
function generates tokens with access privileges based on
attribute-based access control (ABAC). For more
information, see Tokens.
External authentication
External authentication is handled by an Identity Provider (IdP) which creates, maintains, and manages identity information. When a Fauna user authenticates with an IdP, the IdP generates a JSON Web Token (JWT) which the user can use to authenticate Fauna queries. For more information, see external authentication.