How luo-yangsiqi/seekdb works
seekdb is a MySQL-compatible database for agent state, usable embedded or as a server. The principal workflow is a client issuing SQL to write or search state: SQL execution reaches transactional storage, while vector indexing can proceed asynchronously; searches combine vector, full-text, and scalar predicates in one query. The README also documents database forks and merges for copy-on-write exploration. The graph reflects those documented capabilities and the sampled Rust protocol, storage, vector-build, and log code; several product subsystems are documented but their wiring is not visible in the sampled source.
Main entry points: ob_static_engine_cg.cpp SQL execution plans · ob_dml_execution.h DML and transactions · ob_log_service.cpp Redo log · ob_query_engine.cpp MVCC memtable
Components 17
Client interface
- MySQL protocol
rust/sql-nio/src/lib.rs
SQL and search
- SQL execution plans
src/sql/code_generator/ob_static_engine_cg.cpp - Tablet scans
src/data_plane/ob_tablet_scan.cpp - Vector search
src/observer/vector_index - Full-text search
src/data_plane/api/data_plane/fts/ob_fts_parser.h - Embedding requests
src/query/vector/ob_vector_embedding_handler.cpp
Transactional storage
- DML and transactions
src/data_plane/api/data_plane/access/ob_dml_execution.h - MVCC memtable
src/storage/memtable/mvcc/ob_query_engine.cpp - Tablet metadata
src/storage/meta_mem/ob_storage_meta_mem_mgr.cpp - COW fork and merge
src/storage
Indexing and recovery
- Redo log
src/logservice/ob_log_service.cpp - Log engine
src/logservice/palf/log_engine.cpp - Change Stream
src/observer/change_stream - Vector index build
src/storage/ddl/ob_ddl_pipeline.cpp - Vector indexes
src/observer/vector_index - Storage recovery
src/storage/slog_ckpt/ob_local_storage_checkpoint_slog_handler.cpp
Other components
- SQL client
Connections 18
- SQL client → MySQL protocol: sends SQL
- MySQL protocol → SQL execution plans: dispatches requests
- SQL execution plans → DML and transactions: plans DML
- SQL execution plans → Tablet scans: plans scans
- SQL execution plans → Vector search: plans vector search
- SQL execution plans → Full-text search: plans text search
- DML and transactions → MVCC memtable: updates rows
- DML and transactions → Redo log: commits redo
- Redo log → Log engine: persists logs
- Redo log → Change Stream: feeds asynchronously
- Change Stream → Vector index build: updates delta index
- Vector index build → Vector indexes: builds snapshots
- Vector search → Vector indexes: queries indexes
- Tablet scans → MVCC memtable: reads rows
- MVCC memtable → Tablet metadata: uses tablet metadata
- Embedding requests → SQL client: returns vectors
- COW fork and merge → Tablet metadata: manages snapshots
- Storage recovery → Tablet metadata: replays metadata