Là một dự án mã nguồn mở, bloomberg/comdb2 đã đạt 1.5k sao trên GitHub, ngôn ngữ C. Bloomberg's distributed RDBMS
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Comdb2 is a clustered RDBMS built on Optimistic Concurrency Control techniques.
It provides multiple isolation levels, including Snapshot and Serializable Isolation.
Read/Write transactions run on any node, with the client library transparently negotiating connections to lowest cost (latency) node which is available.
The client library provides transparent reconnect.
Work on Comdb2 was started at Bloomberg LP in 2004 and it has been under heavy development since.
More information about the architecture of the project can be found in our VLDB 2016 paper and for more information on usage please look in the Docs.
Documentation
Comdb2 documentation is included in the docs directory.
It can be hosted locally with jekyll by running jekyll serve from the docs directory.
Contributing
Please refer to our contribution guide for instructions.
We welcome code and idea contributions.
Quick Start
On every machine in the cluster:
Make sure all machines in the cluster can talk to each other via ssh.
Copy keys around if needed.
It is recommended to increase the open file limits, at least in the sessions which start pmux and server.
Build and Install Comdb2:
mkdir build && cd build && cmake .. && make && sudo make install
Add /opt/bb/bin to your PATH
export PATH=$PATH:/opt/bb/bin
Start pmux:
pmux -n
(optional) Comdb2 nodes identify each other by their hostnames. If the hostname
of each node isn't resolvable from other nodes, we should tell Comdb2 the full
domain name to use for the current node. Most setups won't have this issue.
Tell comdb2 our FQDN.
vi /opt/bb/etc/cdb2/config/comdb2.d/hostname.lrl
add current machine's name, e.g.
hostname machine-1.comdb2.example.com
On one machine (say machine-1), create a database - this example creates a database
called testdb stored in ~/db.
comdb2 --create --dir ~/db testdb
Note: the --dir PATH parameter is optional, and if it is omitted comdb2 uses a default root of /opt/bb/var/cdb2/ for creating a database directory to contain the database files, which is named as per the database name parameter; hence in this case /opt/bb/var/cdb2/testdb.
The default root will have to be created explicitly with the desired permissions before invoking comdb2 --create for a database.
In this quick start, we use the home directory to avoid obfuscating the key steps of the process.
Configure the nodes in the cluster:
vi ~/db/testdb.lrl
add
cluster nodes machine-1.comdb2.example.com machine-2.comdb2.example.com
Note: the log dir comdb2 uses by default is /opt/bb/var/log/cdb2/
If this directory does not have permissions allowing the user to create file, there will be diagnostics output such as:
[ERROR] error opening '/opt/bb/var/log/cdb2/testdb.longreqs' for logging: 13 Permission denied
This condition will not impact operation of the database for the purposes of this quick start.
On any node, start using the database. You don't have any tables yet. You can add them with cdb2sql
Example -
cdb2sql testdb local 'CREATE TABLE t1 {
schema {
int a
}
}'
Database can be queried/updated with cdb2sql:
cdb2sql testdb local 'insert into t1(a) values(1)'
(rows inserted=1)
cdb2sql testdb local 'select * from t1'
(a=1)
Comdb2 Directory Contents
Directory
Description
bbinc/
Header & Generic include files
bdb/
Table layer
berkdb/
Btrees layer
cdb2api/
Client code
cdb2jdbc/
JDBC driver
cmake/
cmake configuration files
comdb2rle/
Run length encoding
contrib/
Misc useful programs that aren't part of core Comdb2
crc32c/
Checksum component
csc2/
csc2 processing
csc2files/
csc2 config files
cson/
JSON library
datetime/
Datetime component
db/
Types layer and overall glue
dfp/
Decimal number component
dlmalloc/
Local malloc version
docs/
Documentation
lua/
All things pertaining to lua VM used for stored procedures
TopGit chưa ghi nhận license cho bloomberg/comdb2. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
bloomberg/comdb2 có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho bloomberg/comdb2. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
bloomberg/comdb2 có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho bloomberg/comdb2. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
bloomberg/comdb2 còn đang phát triển không?
Commit gần nhất trên bloomberg/comdb2 là 10 ngày trước (theo timestamp GitHub). Repo có 241 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc thêm về bloomberg/comdb2 ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/bloomberg/comdb2 là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc comdb2 có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về comdb2.