Strong consistency refers to a guarantee that, once a transaction has been committed, all subsequent reads of the data will always return the latest version of the data. This ensures that all users of the database see a consistent and up-to-date view of the data, regardless of the location or timing of their reads.
Strong consistency provides a higher degree of reliability and predictability compared to weaker forms of consistency, such as eventual consistency.
With strong consistency, transactions are guaranteed to be processed in the order in which they were submitted, and any changes made to the data by one transaction are immediately visible to all other transactions.
SQLite Cloud is a distributed relational database system built on top of the SQLite database engine. It has been specifically designed from the ground up to ensure the strong consistency of your data across all nodes in a cluster.
Before SQLite Cloud an SQLite database could only be shared within local processes. Some solutions exist to share SQLite databases but have several limitations and require highly specialized technical expertise to set up and maintain.
SQLite Cloud allows you to share and scale any SQLite database globally in a few seconds. We guarantee your data be strongly consistent across all the nodes while we handle all the technical details about managing the underlying infrastructure, security, and data distribution.
SQLite Cloud is a fully-managed distributed database system built on top of the SQLite database engine.
Under the hood, we use Raft as our consensus algorithm.
Raft offers a generic way to distribute a state machine 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 provides an open-source C library that is 100% source code compatible(1) with SQLite (based on our official SQLiteCloud C SDK). The library is automatically updated each time a new version of SQLite is released.
The C example is extracted from https://www.sqlite.org/quickstart.html and except for the include directive that points to our local sqlite3 C bridge file, the only change to the code is the DATABASE path. Conditional compilation enables you to execute the same code with a local SQLite database and with a SQLite Cloud shared database (for brevity, we omitted the callback function).
In a local example, you would likely pass a path to a local database file like /var/databases/invoice.sqlite.
To use SQLite Cloud databases, you change the path to sqlitecloud://username@password:hostname/invoice.sqlite.
(1) VFS and create functions/modules related API are not supported