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


AI Breakthrough For Robot Surgery
17/11/2024

Using imitation learning, a robot has learned to perform surgical procedures as skillfully as human surgeons, bringing the field of robotic surgery closer to true autonomy.



AI Propels Python To Top Language on GitHub
30/10/2024

This year's Octoverse Report reveals how AI is expanding on GitHub and that Python has now overtaken JavaScript as the most popular language on GitHub. The use of Jupyter Notebooks has also surged.


More News

espbook

 

Comments




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

Last Updated ( Monday, 02 September 2019 )