• Stars
    star
    3,472
  • Rank 12,835 (Top 0.3 %)
  • Language
    C
  • License
    Other
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Embeddable, replicated and fault tolerant SQL engine.

dqlite CI Tests codecov

English|įŽ€äŊ“中文

dqlite is a C library that implements an embeddable and replicated SQL database engine with high availability and automatic failover.

The acronym "dqlite" stands for "distributed SQLite", meaning that dqlite extends SQLite with a network protocol that can connect together various instances of your application and have them act as a highly-available cluster, with no dependency on external databases.

Design highlights

  • Asynchronous single-threaded implementation using libuv as event loop.
  • Custom wire protocol optimized for SQLite primitives and data types.
  • Data replication based on the Raft algorithm and its efficient C-raft implementation.

License

The dqlite library is released under a slightly modified version of LGPLv3, that includes a copyright exception allowing users to statically link the library code in their project and release the final work under their own terms. See the full license text.

Compatibility

dqlite runs on Linux and requires a kernel with support for native async I/O (not to be confused with POSIX AIO), which is used by the libuv backend of C-raft.

Try it

The simplest way to see dqlite in action is to use the demo program that comes with the Go dqlite bindings. Please see the relevant documentation in that project.

Media

A talk about dqlite was given at FOSDEM 2020, you can watch it here.

Here is a blog post from 2022 comparing dqlite with rqlite and Litestream, other replication software for SQLite.

Wire protocol

If you wish to write a client, please refer to the wire protocol documentation.

Install

If you are on a Debian-based system, you can get the latest development release from dqlite's dev PPA:

sudo add-apt-repository ppa:dqlite/dev
sudo apt-get update
sudo apt-get install libdqlite-dev

Build

To build libdqlite from source you'll need:

  • A reasonably recent version of libuv (v1.8.0 or beyond).
  • A reasonably recent version of sqlite3-dev
  • A build of the C-raft Raft library.

Your distribution should already provide you with a pre-built libuv shared library and libsqlite3-dev.

To build the raft library:

git clone https://github.com/canonical/raft.git
cd raft
autoreconf -i
./configure
make
sudo make install
cd ..

Once all the required libraries are installed, in order to build the dqlite shared library itself, you can run:

autoreconf -i
./configure
make
sudo make install

Usage Notes

Detailed tracing will be enabled when the environment variable LIBDQLITE_TRACE is set before startup.

More Repositories

1

microk8s

MicroK8s is a small, fast, single-package Kubernetes for datacenters and the edge.
Python
8,492
star
2

multipass

Multipass orchestrates virtual Ubuntu instances
C++
7,204
star
3

lxd

Powerful system container and virtual machine manager
Go
4,335
star
4

cloud-init

Official upstream for the cloud-init: cloud instance initialization
Python
2,963
star
5

snapd

The snapd and snap tools enable systems to work with .snap files.
Go
1,894
star
6

snapcraft

Package, distribute, and update any app for Linux and IoT.
Python
1,178
star
7

raft

C implementation of the Raft consensus protocol
C
852
star
8

lightdm

Display Manager
C
825
star
9

vanilla-framework

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
HTML
723
star
10

netplan

Declarative network configuration for various backends
Python
671
star
11

ubuntu-desktop-installer

Ubuntu Desktop Installer
Dart
537
star
12

subiquity

Ubuntu Server Installer, and backend for Ubuntu Desktop Installer
Python
481
star
13

go-dqlite

Go bindings for libdqlite
Go
358
star
14

maas

Official MAAS repository mirror (may be out of date). Development happens in Launchpad (https://git.launchpad.net/maas/).
Python
350
star
15

microcloud

Automated private cloud based on LXD, Ceph and OVN
Go
267
star
16

chisel

Go
263
star
17

lxd-ui

Easy and accessible container and virtual machine management. A browser interface for LXD
TypeScript
260
star
18

pylxd

Python module for LXD
Python
251
star
19

operator

Pure Python framework for writing Juju charms
Python
245
star
20

microceph

MicroCeph is snap-deployed Ceph with built-in clustering
Go
211
star
21

ubuntu.com

The official website for the Ubuntu operating system
HTML
189
star
22

packer-maas

Packer templates to create MAAS deployable images
Python
172
star
23

pebble

Take control of your internal daemons!
Go
139
star
24

snapcraft.io

The official website's repository for the Snap store
JavaScript
129
star
25

prometheus-openstack-exporter

OpenStack exporter for the prometheus monitoring system
Python
115
star
26

firmware-updater

An experimental firmware updater UI based on fwupd
Dart
109
star
27

ubuntu-core-desktop

Makefile
102
star
28

ubuntu-image

Official tool to build Ubuntu Images.
Go
100
star
29

bundle-kubeflow

Charmed Kubeflow
Python
98
star
30

cloud-utils

This package provides a useful set of utilities for interacting with a cloud.
Shell
91
star
31

dbus.dart

Native Dart client library to use DBus.
Dart
90
star
32

react-components

A set of components based on Vanilla Framework
TypeScript
88
star
33

sec-cvescan

Analyzes an Ubuntu system and checks for unpatched vulnerabilities.
Python
87
star
34

ubuntu-image-legacy

Legacy Python-based Ubuntu image building scripts. Please see Canonical/ubuntu-image instead. Report bugs at Launchpad.
Python
86
star
35

lxd-demo-server

The LXD demo server
JavaScript
75
star
36

Ubuntu-Sans-Mono-fonts

Python
71
star
37

tdx

Intel confidential computing - TDX
Python
69
star
38

open-documentation-academy

Learn open-source software documentation skills with Canonical
Shell
69
star
39

microk8s-community-addons

The add-ons shipped with MicroK8s
Python
67
star
40

charmcraft

Collaborate, build and publish charmed operators for Kubernetes, Linux and Windows.
Python
66
star
41

steam-snap

Steam as a snap
Python
66
star
42

ubuntu-desktop-provision

Ubuntu Desktop Provision
Dart
64
star
43

matter-pi-gpio-commander

Matter Raspberry Pi GPIO Commander - Turn your Pi into a Matter lighting device!
C++
63
star
44

python-libmaas

Unofficial python client library for MAAS
Python
62
star
45

terraform-provider-maas

Terraform MAAS provider
Go
60
star
46

design-vanilla-framework

Design components for Vanilla Framework.
60
star
47

autoinstall-desktop

Python
59
star
48

curtin

Official mirror of curtin project. Please direct merge proposals to https://code.launchpad.net/curtin
Python
58
star
49

Ubuntu-Sans-fonts

Python
56
star
50

etrace

Utility for tracing execution of apps
Go
55
star
51

multipass-blueprints

Blueprint definitions for [`multipass launch`](https://multipass.run)
54
star
52

ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
Python
52
star
53

bluez.dart

Dart
51
star
54

jhack

Chock-full of Juju hackery.
Python
51
star
55

ubuntu-flutter-plugins

A collection of Flutter plugins and packages for Ubuntu applications.
Dart
48
star
56

landscape-client

The Landscape Client is the agent which communicates with the Landscape service.
Python
47
star
57

wizard_router

A classic linear wizard router for Flutter
Dart
47
star
58

desktop_notifications.dart

Native Dart client library to send Linux desktop notifications.
Dart
44
star
59

maas-ansible-playbook

An Ansible playbook for installing and configuring MAAS
Jinja
44
star
60

microk8s-core-addons

Core MicroK8s addons
Python
43
star
61

k8s-snap

Canonical Kubernetes is an opinionated and CNCF conformant Kubernetes operated by Snaps and Charms, which come together to bring simplified operations and an enhanced security posture on any infrastructure.
Go
42
star
62

nrpe_exporter

Prometheus NRPE exporter. This exporter exposes metrics on commands sent to a running NRPE daemon.
Go
42
star
63

candid

Identity Manager Service
Go
39
star
64

ubuntu-drivers-common

Python
38
star
65

workshops

Workshops
Dart
34
star
66

k8s-dqlite

Dqlite for Kubernetes
Go
34
star
67

rockcraft

Tool to create OCI Images using the language from Snapcraft and Charmcraft.
Python
34
star
68

chisel-releases

34
star
69

pi-gadget

Universal pi (pi2,pi3,pi4,cm3,cm4 and future) gadget snap for Ubuntu Core and classic systems.
Makefile
33
star
70

maas-ui

The UI for MAAS (metal-as-a-service)
TypeScript
32
star
71

ubuntu-cooker

Ubuntu WSL UWP Builder
PowerShell
31
star
72

pc-gadget

The gadget snap for Personal Computers using 64bit Intel or AMD processors
31
star
73

kubeflow-examples

Charmed Kubeflow examples
Jupyter Notebook
31
star
74

snapd.dart

Native Dart client to access snapd
Dart
31
star
75

hotsos

Software analysis toolkit. Define checks in high-level language and leverage library to perform analysis of common Cloud applications.
Python
31
star
76

autoinstall-generator

Utility to convert Debian Installer preseed to Subiquity answers
Python
31
star
77

checkbox

Checkbox
Python
30
star
78

nm.dart

Native Dart client library to access NetworkManager on Linux.
Dart
29
star
79

landscape-scripts

A collection of scripts to make Landscape more powerful
Shell
29
star
80

microovn

Snap based deployment of OVN
Go
26
star
81

colcon-in-container

Colcon extension to build a colcon workspace in a container
Python
25
star
82

sync-issues-github-jira

Automation to sync issues from Github (using Github actions) to Jira (via Jira webhooks)
25
star
83

models

Reference Models
Python
24
star
84

core-base

The main repository for ubuntu-core base snaps. It contains snaps from core22+.
Shell
24
star
85

charms.reactive

Framework for developing charms and relations using the reactive pattern
Python
22
star
86

probert

Prober tool - Hardware discovery library used in Subiquity
Python
22
star
87

apport

Apport intercepts Program crashes, collects debugging information about the crash and the operating system environment, and sends it to bug trackers in a standardized form. It also offers the user to report a bug about a package, with again collecting as much information about it as possible.
Python
22
star
88

go-tpm2

Native go library for interacting with TPM 2.0 devices
Go
22
star
89

iot-agent

IoT Device Management Agent
Go
21
star
90

prometheus-k8s-operator

This charmed operator automates the operational procedures of running Prometheus, an open-source metrics backend.
Python
21
star
91

dotrun

Python
21
star
92

microcluster

dqlite cluster management using go-dqlite
Go
21
star
93

maas-commissioning-scripts

A repository of example MAAS commissioning scripts
Shell
20
star
94

setup-lxd

A GitHub Action to install & configure LXD on a runner.
20
star
95

desktop-design

HTML
19
star
96

gomaasclient

Go MAAS client
Go
19
star
97

microk8s-addons-repo-template

Template repository for MIcroK8s addons
Python
19
star
98

imagecraft

Customize and build bootable Ubuntu images.
Python
18
star
99

pycloudlib

Python library to launch, interact and, snapshot cloud instances
Python
18
star
100

serial-vault

Go
18
star