How lvn2007/xstore works
XStore is a time-series/key-value database served over ZeroMQ and Protocol Buffers. Its principal workflow is a client request reaching the server and using the store’s data operations; the README also documents WAL-backed durability, index rebuilding, optional CURVE authentication, and a separate viewer for browsing, querying, aggregates, and host monitoring. The viewer and several storage subsystems are represented at their supported source paths, but their internal call wiring was not sampled, so uncertain links are omitted. The source index and README support the shown relationships; unsampled implementation details are not asserted.
Main entry points: ZMQ_Server.cpp ZMQ server · main.cpp Server bootstrap · XStore.h XStore API · XStore_Wal.cpp Write-ahead log
Components 25
Server runtime
- Server bootstrap
src/main.cpp - ZMQ server
src/XStore_Networking/ZMQ_Server.cpp - Reply broker
src/XStore_Networking/ZMQ_Broker.cpp - Stream flow control
include/Networking/ZMQ_StreamFlow.h - Gone-client tracking
include/Networking/ZMQ_GoneClients.h
Storage engine
- XStore API
include/XStore/XStore.h - Database management
src/XStore/XStore_Management.cpp - Batch operations
src/XStore/XStore_BatchOps.cpp - Range operations
src/XStore/XStore_RangeOps.cpp - Unary operations
src/XStore/XStore_UnaryOps.cpp - Aggregates
src/XStore/XStore_Aggregates.cpp - Category index
src/XStore/XStore_CatIdx.cpp - Zone map index
src/XStore/XStore_ZoneMap.cpp - Write-ahead log
src/XStore/XStore_Wal.cpp - WAL ring
src/XStore/XStore_WalRing.cpp - WAL checkpoint
src/XStore/XStore_WalCheckpoint.cpp - Data store
Security
- CURVE authentication
src/XStore_Networking/XStore_Curve.cpp - Key administration
tools/xstore-keys/main.cpp
Clients and viewer
- C++ client
client_src/Cpp/XStore_Client.h - Python client
client_src/Python/XStore.py - Viewer server client
tools/xstore-viewer/src/client.rs - Viewer interface
tools/xstore-viewer/frontend/app.js - Viewer web host
tools/xstore-viewer/src/web.rs
Other components
- Application client
Connections 27
- Application client → C++ client: uses
- Application client → Python client: uses
- C++ client → ZMQ server: requests
- Python client → ZMQ server: requests
- Server bootstrap → ZMQ server: starts
src/main.cpp - Server bootstrap → XStore API: initializes
src/main.cpp - Server bootstrap → CURVE authentication: configures
src/main.cpp - Server bootstrap → WAL ring: configures
src/main.cpp - Server bootstrap → WAL checkpoint: configures
src/main.cpp - ZMQ server → Reply broker: uses
src/XStore_Networking/ZMQ_Server.cpp - ZMQ server → Stream flow control: controls replies
include/Networking/ZMQ_StreamFlow.h - Gone-client tracking → Stream flow control: cancels windows
include/Networking/ZMQ_GoneClients.h - Write-ahead log → WAL ring: uses
src/XStore/XStore_Wal.cpp - Write-ahead log → WAL checkpoint: uses
src/XStore/XStore_Wal.cpp - Write-ahead log → Data store: replays into
- Database management → Zone map index: rebuilds
src/XStore/XStore_Management.cpp - Database management → Category index: rebuilds
src/XStore/XStore_Management.cpp - XStore API → Batch operations: dispatches operations
- XStore API → Range operations: dispatches operations
- XStore API → Unary operations: dispatches operations
- XStore API → Aggregates: provides aggregates
- Key administration → CURVE authentication: manages keys
tools/xstore-keys/main.cpp - CURVE authentication → ZMQ server: authenticates peers
- Application client → Viewer interface: browses
- Viewer interface → Viewer server client: queries server
- Viewer web host → Viewer interface: hosts interface
- Viewer server client → ZMQ server: queries