如何理解dqlite

這篇文章給大家介紹如何理解dqlite,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

在未央等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都網(wǎng)站制作、網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作按需定制開發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站制作,營銷型網(wǎng)站,外貿(mào)網(wǎng)站制作,未央網(wǎng)站建設(shè)費(fèi)用合理。

dqlite是一個(gè) C library,實(shí)現(xiàn)了一個(gè)嵌入式的可復(fù)制SQL database engine,具有高可用和自動(dòng)失效恢復(fù)的特性。

名稱 "dqlite" 意味著 "distributed SQLite",是 dqlite 擴(kuò)展了 SQLite 而來。SQLite主要單機(jī)使用,而dqlite添加了 network protocol可以將多個(gè)應(yīng)用實(shí)例鏈接為一個(gè)高可用的集群,而且不需要依賴其他的外部數(shù)據(jù)庫。

使用dqlite的Kubernetes分發(fā)版包括MicroK8s和K3s。

主要特性

能力:

  • 完全同步的 network 和 disk I/O

  • Comprehensive test suite for correctness

  • Benchmarked for memory footprint and network efficiency

  • 持久化存儲(chǔ)用于transaction logs

  • 快速恢復(fù),用于system restore

  • 穩(wěn)定的 Golang 客戶端,文檔包含 wire protocol 用于其它語言的實(shí)現(xiàn)。

  • 支持 ARM, X86, POWER 和 IBM Z architectures

特性:

  • 超低時(shí)延,C-Raft 最小化交易延遲。

  • 移植性,C-Raft 和 dqlite 都用c語言編寫,提供多平臺(tái)支持。

  • 開源,采用Apache 2.0 許可,最大的兼容性。

  • 可用,Includes common CLI pattern for database initialization and voting member joins and departures.

  • 快速失效回復(fù),Minimal, tunable delay for failover with automatic leader election.

  • 持續(xù)性,Disk-backed database with in-memory options and SQLite transactions.

  • 設(shè)計(jì)特性,Asynchronous single-threaded implementation using libuv as event loop.

  • 自定義的wire protocol,優(yōu)化了SQLite primitives 和 data types.

  • 數(shù)據(jù)復(fù)制,基于 Raft algorithm 和高效的 C-raft 實(shí)現(xiàn)。

許可

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.

協(xié)議-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

源碼構(gòu)建

To build libdqlite from source you'll need:

  • A reasonably recent version of libuv (v1.8.0 or beyond).

  • A patched version of SQLite with support for WAL-based replication.

  • A build of the C-raft Raft library.

  • A build of the libco coroutine library.

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

關(guān)于如何理解dqlite就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。

分享題目:如何理解dqlite
網(wǎng)站URL:http://muchs.cn/article20/ihshjo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序網(wǎng)站維護(hù)、網(wǎng)站導(dǎo)航品牌網(wǎng)站設(shè)計(jì)、服務(wù)器托管面包屑導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計(jì)