How ichbingautam/quinedb works
QuineDB is a Redis-compatible, distributed in-memory key-value server. A client sends RESP commands over TCP; the server parses and dispatches them, and commands operate on the key’s owning per-core shard or forward requests to that core and return responses. The graph also captures persistence, asynchronous I/O, and the documented TTL and consensus capabilities. Some internal network and command details are unsampled; their links are omitted or marked unverified where the evidence does not establish a call.
Main entry points: main.cpp Command dispatch · topology.hpp Core topology · shard.cpp Per-core shards · tcp_server.cpp TCP server
Components 20
Client networking
- TCP server
src/network/tcp_server.cpp - Connections
src/network/connection.cpp - RESP parser
src/network/resp_parser.cpp
Core runtime
- Async I/O loop
src/core/io_context.cpp - Core topology
src/core/topology.hpp - Key router
src/core/router.cpp - Core message channels
src/core/itc_channel.hpp - Command dispatch
src/main.cpp - Raft skeleton
src/consensus/raft.hpp
Command operations
- String commands
src/commands/string_commands.hpp - List commands
src/commands/list_commands.hpp - Set commands
src/commands/set_commands.hpp - Hash commands
src/commands/hash_commands.hpp - Sorted-set commands
src/commands/zset_commands.hpp - Generic and TTL
src/commands/generic_commands.hpp - Admin commands
src/commands/admin_commands.hpp
Storage and durability
- Per-core shards
src/storage/shard.cpp - Data structures
src/storage/value.hpp - RDB snapshots
src/persistence/rdb_manager.hpp
Other components
- Redis client
Connections 37
- Redis client → TCP server: sends commands
README.md - TCP server → Connections: accepts connections
src/network/tcp_server.cpp - Connections → RESP parser: parses input
- Connections → Async I/O loop: submits I/O
src/network/connection.cpp - TCP server → Async I/O loop: uses event loop
src/network/tcp_server.cpp - Command dispatch → Async I/O loop: runs per core
src/main.cpp - Command dispatch → Core topology: initializes workers
src/main.cpp - Command dispatch → TCP server: starts server
src/main.cpp - Command dispatch → RDB snapshots: loads snapshot
src/main.cpp - Command dispatch → String commands: registers commands
src/main.cpp - Command dispatch → List commands: registers commands
src/main.cpp - Command dispatch → Set commands: registers commands
src/main.cpp - Command dispatch → Hash commands: registers commands
src/main.cpp - Command dispatch → Sorted-set commands: registers commands
src/main.cpp - Command dispatch → Admin commands: registers commands
src/main.cpp - Command dispatch → Generic and TTL: registers commands
src/main.cpp - Command dispatch → Core message channels: handles messages
src/main.cpp - Core topology → Key router: routes keys
src/core/topology.hpp - Core topology → Per-core shards: owns shards
src/core/topology.hpp - Core topology → Core message channels: owns channels
src/core/topology.hpp - String commands → Core topology: checks ownership
src/commands/string_commands.hpp - List commands → Core topology: checks ownership
src/commands/list_commands.hpp - Set commands → Core topology: routes keys
src/commands/set_commands.hpp - Hash commands → Core topology: routes keys
src/commands/hash_commands.hpp - Sorted-set commands → Core topology: routes keys
src/commands/zset_commands.hpp - Generic and TTL → Core topology: uses topology
src/commands/generic_commands.hpp - Admin commands → RDB snapshots: saves snapshot
src/commands/admin_commands.hpp - RDB snapshots → Core topology: loads into shards
src/persistence/rdb_manager.hpp - RDB snapshots → Per-core shards: reads snapshots
src/persistence/rdb_manager.hpp - Per-core shards → Data structures: stores values
- String commands → Per-core shards: reads and writes
- List commands → Per-core shards: reads and writes
src/commands/list_commands.hpp - Set commands → Per-core shards: reads and writes
- Hash commands → Per-core shards: reads and writes
- Sorted-set commands → Per-core shards: reads and writes
- Generic and TTL → Per-core shards: manages expiry
- Core topology → Raft skeleton: cluster direction