Canonical Company significant project release (Distributed SQLite), which develops a SQLite-compatible embedded SQL engine that supports data replication, automatic failover, and fault tolerance through splitting handlers across multiple nodes. The DBMS is implemented in the form of a C library attached to applications and licensed under Apache 2.0 (the original SQLite is in the public domain). Language bindings available .
The library is an add-on to the existing SQLite codebase that adds network protocol support for linking multiple application instances running on different hosts. An application built with Dqlite can function as a self-sufficient failover cluster that does not depend on external DBMS. In practice, Dqlite is used by Canonical in its container management system. . Among the areas of application of the library, the creation of fault-tolerant IoT devices and handlers in systems is also mentioned.
.
To ensure consistency in data replication, a consensus method is used based on the algorithm , which is used by projects such as etcd, RethinkDB, CockroachDB, and OpenDaylight. Dqlite uses its own asynchronous implementation written in C language. Ready-made libraries are used to multiplex the processing of connections and organize the launch of coroutines. и .
Compared to a similar project , Dqlite provides full transaction support, can link to any C project, allows you to use the time() function, and uses frame-based replication instead of SQL translation-based replication.
Features of Dqlite:
- Performing all disk and network operations in asynchronous mode;
- Availability of a test set to confirm the correctness of the data;
- Low memory consumption and efficient network communication;
- Permanent storage of the database and transaction log on disk (with the possibility of caching in memory);
- Fast recovery after failures;
- A stable Go CLI client that can be used to initialize the database, set up replication, and connect/disconnect nodes;
- Support for ARM, X86, POWER and IBM Z architectures;
- The implementation of the Raft algorithm is optimized to minimize delays when committing transactions.
Source: opennet.ru
