The YugabyteDB code is split into two top-level sections:
-
postgresis our modified fork of the Postgresql code. This is mostly C code. -
ybis the core of the YugabyteDB storage engine. This is mostly C++ code.
The core storage engine is split into the following C++ components:
-
bfpgcovers Builtin Functions for Postgres. This directory is now DEPRECATED, in favor of the respective code inpostgres. -
bfqlcovers Builtin Functions for YCQL. -
cdcis the main code for the Xcluster Replication feature and the CDCSDK, generalized Change Data Capture feature. -
clientis the underlying client component used for RPC communication between servers. -
commonis code shared across server, client and query components. -
consensusis the core Raft consensus implementation. -
docdbis the DocDB encoding implementation. -
encryptionis a set of utilities for encryption related work, such as TLS and Encryption at Rest. -
fscovers the abstractions for manipulating the underlying file systems. -
gen_yrpccovers the abstraction on top of our protobuf usage, for generating server side code. -
gutilis for utilities to augment the standard library, from the upstream Chromium project. -
integration-testsis strictly used for tests which depend on several components in the code. -
masteris the control path server side of the database. This is responsible for DDLs, Cluster balancing, health checking, etc. -
rocksdbis our heavily modified fork of the RocksDB single-node storage library. -
rocksutilcovers utilities for working with RocksDB. -
rpcis the underlying RPC layer implementation. -
servercover abstract classes used by both master and tserver processes. -
tabletis the main data path IO logic, both for single shard and multi shard transactions. -
toolscontains command line utilities to help debug, inspect or modify state on a live running cluster. -
tserveris the data path server side of the database. Responsible internally for managing tablets and externally for communication with master and the Postgres clients. -
utilcovers utilities used across the entire code base. These range from low level atomic abstractions or memory management primitives, to higher level thread pools, metrics and gflag handling. -
yqlcovers query layer abstractions. This contains both server side code for YCQL and YEDIS, as well as the C to C++ transition for our YSQL layer.
