Dqlite extends SQLite To Clusters
Written by Kay Ewbank   
Monday, 02 September 2019

A distributed database that extends SQlite across clusters of machines has recently been updated to a 1.0 branch.

Dqlite (“distributed SQLite”) extends SQLite across a cluster of machines, with automatic failover and high-availability. It uses C-Raft, an optimized Raft implementation in C, to gain high-performance transactional consensus and fault tolerance while preserving SQlite’s efficiency and tiny footprint. SQLite is the world’s most widely used embedded SQL implementation.

dqlite

Dqlite has an asynchronous single-threaded implementation using libuv as the event loop, and the developers have implemented a custom wire protocol optimized for SQLite primitives and data types.

The highest profile user of Dqlite is the LXD (LinuX Daemon) system containers manager, which uses dqlite to implement high-availability when run in cluster mode.

C-Raft is a hand-tuned C implementation of Raft, a consensus algorithm. Consensus algorithms ensure data persistence in the event of the loss of one or more machines in the cluster, as long as a majority survives.

Dqlite was originally implemented in Go, but has been rewritten in C because the developers at Canonical encountered performance problems due to the way Go interoperates with C: Go considers a function call into C that lasts more than 20 microseconds as a blocking system call. The goroutine running that C call is therefore put in the waiting queue and resuming it will causes a context switch, degrading performance.

The developers say that Dqlite offers fully asynchronous network and disk I/O, and persistent storage to disk for transaction logs. It has been benchmarked for memory footprint and network efficiency, and offers fast recovery for system restore. It runs on ARM, X86, POWER and IBM Z architectures, but at the moment doesn't support either Windows or MacOS. There's a stable Golang client and a documented wire protocol for other languages.

 

 dqlite

 

 

More Information

Dqlite Home Page

Related Articles

SQLite Introduces Vacuum Into

SQLite Adds Zipfile Support

SQLite 3.20 Improves Query Planner

SQLite 3.17 Adds SHA1 Extensions 

SQLite 3.16 Adds Pragma Functions  

SQLite 3.15 Adds Row Value Support

Portable Version Of DB Browser For SQLite

SQLite 3.9 

SQLite Updated

LiteCLI - SQLite Client with Autocomplete

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.

Banner


Mathematical Art 2020
10/05/2020

There is a deep affinity between math and art. There is beauty in mathematical symbols and the forms that they describe. Every year the American Mathematical Society (AMS) organizes an art exhibition  [ ... ]



GitHub Desktop 2.5 Adds Tags
18/05/2020

There's a new release of GitHub Desktop with support for tags, meaning developers can create, push, and view tags directly from GitHub Desktop. GitHub Desktop gives developers a way to work with workf [ ... ]


More News

graphics

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 02 September 2019 )