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


pg_parquet - Postgres To Parquet Interoperability
28/11/2024

pg_parquet is a new extension by Crunchy Data that allows a PostgreSQL instance to work with Parquet files. With pg_duckdb, pg_analytics and pg_mooncake all of which can access Parquet files, is  [ ... ]



Google Opensources Privacy Library
08/11/2024

Google is making a new differential privacy library available as open source. PipelineDP4J is a Java-based library that can be used to analyse data sets while preserving privacy.


More News

espbook

 

Comments




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

Last Updated ( Monday, 02 September 2019 )