如何理解dqlite

发布时间:2021-11-22 19:10:40 作者:柒染
来源:亿速云 阅读:520

这篇文章给大家介绍如何理解dqlite,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

dqlite是一个 C library,实现了一个嵌入式的可复制SQL database engine,具有高可用和自动失效恢复的特性。

名称 "dqlite" 意味着 "distributed SQLite",是 dqlite 扩展了 SQLite 而来。SQLite主要单机使用,而dqlite添加了 network protocol可以将多个应用实例链接为一个高可用的集群,而且不需要依赖其他的外部数据库。

使用dqlite的Kubernetes分发版包括MicroK8s和K3s。

主要特性

能力:

特性:

许可

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

试用

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.

媒体

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

协议-Wire protocol

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

快速安装

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

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

源码构建

To build libdqlite from source you'll need:

Your distribution should already provide you a pre-built libuv shared library.

To build the other libraries:

git clone --depth 100 https://github.com/canonical/sqlite.git
cd sqlite
./configure --enable-replication
make
sudo make install
cd ..
git clone https://github.com/canonical/libco.git
cd libco
make
sudo make install
cd ..
git clone https://github.com/canonical/raft.git
cd raft
autoreconf -i
./configure
make
sudo make install
cd ..

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

autoreconf -i
./configure
make
sudo make install

关于如何理解dqlite就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

推荐阅读:
  1. 如何理解
  2. 如何理解zigbee

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

上一篇:gRPC的原理是什么

下一篇:c语言怎么实现含递归清场版扫雷游戏

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》