Canonical a significant release of the project (Distributed SQLite), developing a SQLite-compatible embedded SQL engine that supports data replication, automatic recovery from failures, and fault tolerance by distributing handlers across multiple nodes. The DBMS is implemented as a C library that can be attached to applications and is licensed under Apache 2.0 (the original SQLite is provided as public domain). Bindings for the language are available .
The library is an extension of the existing SQLite codebase, adding support for a network protocol to link multiple instances of an application running on different hosts. An application built with Dqlite can function as a self-sufficient fault-tolerant cluster, independent of external DBMS. In practice, Dqlite is used by Canonical in the container management system . The library is also mentioned for creating fault-tolerant Internet of Things devices and handlers in systems
.
To ensure consistency in data replication, a consensus-reaching method based on the algorithm, which is used in such projects as etcd, RethinkDB, CockroachDB, and OpenDaylight. Dqlite employs a proprietary asynchronous implementation of , written in C. For multiplexing connection handling and organizing coroutine launching, existing libraries are used and .
Compared to a similar project , Dqlite provides full support for transactions, can be linked with any projects in C, allows the use of the time() function, and implements frame-based replication instead of SQL statement-based replication.
Features of Dqlite:
- Performing all disk and network operations asynchronously;
- Availability of a test suite to validate data correctness;
- Low memory consumption and efficient data exchange over the network;
- Persistent storage of the database and transaction log on disk (with possible in-memory caching);
- Rapid recovery from failures;
- A stable CLI client written in Go that can be used for initializing the database, configuring replication, and connecting/disconnecting nodes;
- Support for ARM, X86, POWER, and IBM Z architectures;
- The Raft algorithm implementation is optimized to minimize transaction commit latency.
Source: opennet.ru
