Turso, an extension of libSQL (a SQLite fork), modifies the consistency model due to its network-accessible and replicated nature, deviating from SQLite’s strictly serializable standard.

Establishing Connections

Database operations begin with a client establishing either an HTTP or websocket connection to a database. Following this, an internal SQLite database connection is set up within the server to facilitate the operations.

Data Consistency

Database operations are tightly controlled to maintain order and data integrity.

Primary Database Operations

  • All operations are linearizable, maintaining an ordered history.
  • Writes are fully serialized, with subsequent writes awaiting transaction completion.
  • Users should exercise caution with long-running or abandoned transactions to prevent blocking other writes.

Transactional Consistency

  • Transactions in libSQL, encompassing both batch and interactive transactions, adhere to SQLite’s transaction semantics.
  • libSQL provides snapshot isolation for read operations, ensuring immediate visibility of writes within the same process. This guarantees serializability and isolation from other transactions.