Developer Guide¶
This guide is for engineers who read, modify, or extend the HyperbyteDB codebase. It covers the internal architecture, development setup, code conventions, testing strategy, and contribution process.
Contents¶
-
Architecture — Hexagonal design, component overview, data flow diagrams (Mermaid), and how the system fits together.
-
System architecture — Long-form internal design: module structure, write/query paths, WAL, Parquet, clustering, services, and dependencies (companion to the deep dive series).
-
Development Setup — Local environment, prerequisites, building, running, and debugging.
-
Internals
- Core Modules — Module-by-module source code guide covering every directory under
src/. - Key Design Decisions — Deep dives into the write path, read path, compaction, clustering, and replication.
- Replication design — Replication wire protocol,
sync_quorum, hinted handoff, flow control. -
Extension Points — How to add new InfluxQL statements, storage backends, background services, and HTTP endpoints.
-
Coding Standards — Error handling, async patterns, naming conventions, metrics, logging, and dependency injection.
-
Testing — Test suite inventory, how to run tests, how to write new tests, and test architecture.
-
Building & CI — CI pipeline, Docker builds, release profiles, and the container workflow.
-
Contributing — PR process, code review rubric, engineering policies, and the review checklist.
Quick Reference¶
| Task | Command |
|---|---|
| Build (debug) | cargo build |
| Build (release) | cargo build --release |
| Run server | cargo run -- serve |
| Run all tests | cargo test |
| Run unit tests only | cargo test --lib |
| Run integration tests | cargo test --test '*' |
| Check formatting | cargo fmt --all --check |
| Run linter | cargo clippy --all-targets -- -D warnings |
| Build debug CLI | cargo build --bin hyperbytedb-debug |
| Build backfill tool | cargo build --bin hyperbytedb-backfill |