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


Node Version Manager For Node.js Released
03/10/2019

The OpenJS Foundation has announced that Node Version Manager (nvm), has been taken in as a project by the foundation. Nvm is a POSIX-compliant bash script to manage multiple active Node.js versions.

 [ ... ]



What Does Computer Science Have To Do With Climate Change?
29/09/2019

A recent meeting of the Heidelberg Laureate Forum considered climate change and what computer science has to offer with regard to understanding and fixing the problem. Computer science? Yes, you heard [ ... ]


More News

graphics

 



 

Comments




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

Last Updated ( Monday, 02 September 2019 )