Introduction to SQLite Cloud

Overview

SQLite Cloud is a managed, distributed relational database system built on top of the SQLite database engine.

It has been designed from the ground up to ensure strong consistency across all nodes in a cluster while simultaneously managing the technical aspects of scaling, security, and data distribution. This ensures that you can focus on your core tasks while relying on SQLite Cloud to handle the complexities of managing your databases.

SQLite Cloud is written in ANSI C and GO, and it works on most POSIX systems like Linux, *BSD, and Mac OS X (Windows is supported too). You can use SQLite Cloud from the most popular programming languages or its REST API.


Architecture

SQLite Cloud uses the Raft consensus algorithm to distribute your data changes across a cluster of computing systems, ensuring that each node in the cluster agrees upon the same series of state transitions. Raft implements consensus with a leader approach.

SQLite Cloud supports all the SQLite features without any limitations. It is fully ACID compliant, supports non-deterministic SQL statements, and guarantees strong consistency across all your cluster nodes. This ensures that data read from any node in the system returns the most up-to-date version of the data that has been committed.

In a distributed database system, where data is distributed across multiple nodes, ensuring strong consistency can be challenging due to the potential for network delays, node failures, and concurrent transactions. Maintaining strong consistency is crucial for ensuring that the system behaves as expected and that applications built on top of the system can rely on the accuracy and integrity of the data.

Features

SQLite Cloud provides a comprehensive suite of tools for building realtime, local-first applications.

  • Local Sync: Query your local SQLite database and synchronize with the cloud and across devices in real-time (In development).
  • Offline-first: Resolve conflicts between devices and the cloud with CRDTs (In development).
  • Webhooks: Send changes to your database to external endpoints, or use to trigger edge functions via HTTP, Websockets, or on database events like INSERT, UPDATE, and DELETE.
  • Edge Functions: Run serverless functions on the same node that stores your data for low-latency operations. Trigger with webhooks or on database operations.
  • Pub/Sub: Subscribe to changes in your database to replicate data, power notifications, and build multiplayer experiences.
  • Weblite: Autogenerated REST APIs to interact with your database and edge functions.
  • Query Analyzer: Receive optimization recommendations for your queries to improve performance.
  • Multi-region Load Balancer: Connect to SQLite Cloud from anywhere in the world and SQLite Cloud automatically routes traffic to the nearest node for optimal performance.