{"id":13437568,"url":"https://github.com/canonical/dqlite","last_synced_at":"2025-05-13T20:22:07.057Z","repository":{"id":37382057,"uuid":"92329433","full_name":"canonical/dqlite","owner":"canonical","description":"Embeddable, replicated and fault-tolerant SQL engine.","archived":false,"fork":false,"pushed_at":"2025-04-28T10:36:43.000Z","size":3697,"stargazers_count":4012,"open_issues_count":69,"forks_count":231,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-04-28T12:12:38.344Z","etag":null,"topics":["database","raft","sqlite"],"latest_commit_sha":null,"homepage":"https://dqlite.io","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canonical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-24T19:35:52.000Z","updated_at":"2025-04-27T13:51:20.000Z","dependencies_parsed_at":"2022-07-08T07:39:56.241Z","dependency_job_id":"3ea4df5b-b8b8-4ccd-b782-bf4560297ed8","html_url":"https://github.com/canonical/dqlite","commit_stats":{"total_commits":1514,"total_committers":33,"mean_commits":"45.878787878787875","dds":"0.37384412153236457","last_synced_commit":"9eb8b1dc80c11ec83ee7c93b702a35a4963f513b"},"previous_names":["canonicalltd/dqlite","dqlite/dqlite"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fdqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fdqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fdqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canonical%2Fdqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canonical","download_url":"https://codeload.github.com/canonical/dqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","raft","sqlite"],"created_at":"2024-07-31T03:00:58.386Z","updated_at":"2025-04-28T12:12:48.029Z","avatar_url":"https://github.com/canonical.png","language":"C","readme":"dqlite [![CI Tests](https://github.com/canonical/dqlite/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/canonical/dqlite/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/canonical/dqlite/branch/master/graph/badge.svg)](https://codecov.io/gh/canonical/dqlite)\n======\n\n[English](./README.md)|[简体中文](./README_CH.md)\n\n[dqlite](https://dqlite.io) is a C library that implements an embeddable and\nreplicated SQL database engine with high availability and automatic failover.\n\nThe acronym \"dqlite\" stands for \"distributed SQLite\", meaning that dqlite\nextends [SQLite](https://sqlite.org/) with a network protocol that can connect\ntogether various instances of your application and have them act as a\nhighly-available cluster, with no dependency on external databases.\n\nDesign highlights\n----------------\n\n* Asynchronous single-threaded implementation using [libuv](https://libuv.org/)\n  as event loop.\n* Custom wire protocol optimized for SQLite primitives and data types.\n* Data replication based on the [Raft](https://raft.github.io/) algorithm.\n\nLicense\n-------\n\nThe dqlite library is released under a slightly modified version of LGPLv3,\nthat includes a copyright exception allowing users to statically link the\nlibrary code in their project and release the final work under their own terms.\nSee the full [license](https://github.com/canonical/dqlite/blob/master/LICENSE)\ntext.\n\nCompatibility\n-------------\n\ndqlite runs on Linux and requires a kernel with support for [native async\nI/O](https://man7.org/linux/man-pages/man2/io_setup.2.html) (not to be confused\nwith [POSIX AIO](https://man7.org/linux/man-pages/man7/aio.7.html)).\n\nTry it\n-------\n\nThe simplest way to see dqlite in action is to use the demo program that comes\nwith the Go dqlite bindings. Please see the [relevant\ndocumentation](https://github.com/canonical/go-dqlite#demo) in that project.\n\nMedia\n-----\n\nA talk about dqlite was given at FOSDEM 2020, you can watch it\n[here](https://fosdem.org/2020/schedule/event/dqlite/).\n\n[Here](https://gcore.com/blog/comparing-litestream-rqlite-dqlite/) is a blog\npost from 2022 comparing dqlite with rqlite and Litestream, other replication\nsoftware for SQLite.\n\nWire protocol\n-------------\n\nIf you wish to write a client, please refer to the [wire\nprotocol](https://dqlite.io/docs/protocol) documentation.\n\nInstall\n-------\n\nIf you are on a Debian-based system, you can get the latest development release\nfrom dqlite's [dev PPA](https://launchpad.net/~dqlite/+archive/ubuntu/dev):\n\n```\nsudo add-apt-repository ppa:dqlite/dev\nsudo apt update\nsudo apt install libdqlite-dev\n```\n\nContributing\n------------\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\nBuild\n-----\n\nTo build libdqlite from source you'll need:\n\n* Build dependencies: pkg-config and GNU Autoconf, Automake, libtool, and make\n* A reasonably recent version of [libuv](https://libuv.org/) (v1.8.0 or later), with headers.\n* A reasonably recent version of [SQLite](https://sqlite.org/) (v3.22.0 or later), with headers.\n* Optionally, a reasonably recent version of [LZ4](https://lz4.org/) (v1.7.1 or later), with headers.\n\nYour distribution should already provide you with these dependencies. For\nexample, on Debian-based distros:\n\n```\nsudo apt install pkg-config autoconf automake libtool make libuv1-dev libsqlite3-dev liblz4-dev\n```\n\nWith these dependencies installed, you can build and install the dqlite shared\nlibrary and headers as follows:\n\n```\n$ autoreconf -i\n$ ./configure\n$ make\n$ sudo make install\n```\n\nThe default installation prefix is `/usr/local`; you may need to run\n\n```\n$ sudo ldconfig\n```\n\nto enable the linker to find `libdqlite.so`. To install to a different prefix,\nreplace the configure step with something like\n\n```\n$ ./configure --prefix=/usr\n```\n\nBuilding for static linking\n---------------------------\n\nIf you're building dqlite for eventual use in a statically-linked\nbinary, there are some additional considerations. You should pass\n`--with-static-deps` to the configure script; this disables code that\nrelies on dependencies being dynamically linked. (Currently it only\naffects the test suite, but you should use it even when building\n`libdqlite.a` only for future compatibility.)\n\nWhen linking libdqlite with musl libc, it's recommended to increase\nthe default stack size, which is otherwise too low for dqlite's\nneeds:\n\n```\nLDFLAGS=\"-Wl,-z,stack-size=1048576\"\n```\n\nThe `contrib/build-static.sh` script demonstrates building and\ntesting dqlite with all dependencies (including libc) statically\nlinked.\n\nUsage notes\n-----------\n\nDetailed tracing will be enabled when the environment variable\n`LIBDQLITE_TRACE` is set before startup.  The value of it can be in `[0..5]`\nrange and represents a tracing level, where `0` means \"no traces\" emitted, `5`\nenables minimum (FATAL records only), and `1` enables maximum verbosity (all:\nDEBUG, INFO, WARN, ERROR, FATAL records).\n","funding_links":[],"categories":["HarmonyOS","C","Uncategorized","数据库管理系统","sqlite"],"sub_categories":["Windows Manager","Uncategorized","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanonical%2Fdqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanonical%2Fdqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanonical%2Fdqlite/lists"}