A high-performance, high-throughput data ingestion and columnar storage pipeline built with Go, Protocol Buffers, and C++.
- Fast Ingestion: 10k-100k records/sec via Go HTTP service
- Strict Typing: Protocol Buffers for language-agnostic data contracts
- Durability: NATS JetStream provides at-least-once delivery with disk persistence
- High Performance: C++ columnar storage engine for efficient analytical queries
- Backpressure: Automatic load shedding when ingestion exceeds downstream capacity
- Scalability: Stateless ingestion service, horizontal scaling via NATS and storage replication
Clients
↓
Go Ingestion Service (Worker Pool, Backpressure)
↓
NATS JetStream (Buffer, Durability)
↓
C++ Storage Engine (Columnar, Queryable)
For detailed architecture, see docs/ARCHITECTURE.md.
- Go 1.22+
- Protocol Buffers (
protoc) andbuf - C++17 compatible compiler (for Phase 4)
- Docker & Docker Compose (for NATS)
See docs/DEV_SETUP.md for local development instructions.
- Phase 1: Protobuf Schema Definition ← You are here
- Phase 2: High-Throughput Go Ingestion Service
- Phase 3: NATS JetStream Integration
- Phase 4: C++ Storage Engine
mini-Rockset/
├── proto/ # Protobuf definitions
├── gen/{go,cpp}/ # Generated code (Protobuf → Go/C++)
├── cmd/ingestion-service/ # Go ingestion service entry point
├── internal/ # Go service packages
│ ├── server/ # HTTP handlers
│ ├── worker/ # Worker pool
│ ├── publisher/ # Message publishing
│ ├── consumer/ # Message consuming
│ ├── backpressure/ # Backpressure logic
│ ├── config/ # Configuration
│ └── metrics/ # Observability
├── cpp/ # C++ storage engine
│ ├── src/ # Source files
│ ├── include/ # Headers
│ ├── tests/ # Unit tests
│ └── CMakeLists.txt # Build config
├── docs/ # Documentation
│ ├── ARCHITECTURE.md
│ ├── SCHEMA.md
│ ├── DEV_SETUP.md
│ └── DEPLOYMENT.md
├── docker-compose.yml # NATS local dev environment
├── buf.yaml # Protobuf build config
├── buf.gen.yaml # Protobuf code generation rules
├── go.mod # Go module file
└── Makefile # Build commands (optional)
The core data structure is a Record:
message Record {
string id = 1; // Unique identifier
int64 timestamp = 2; // Unix timestamp (ms)
bytes payload = 3; // Opaque data
map<string, string> metadata = 4; // Tags for filtering
}Records are sent in batches via HTTP POST to /v1/ingest.
For full schema details, see docs/SCHEMA.md.
# Install buf if not present
brew install buf
# Lint Protobuf definitions
buf lint proto/
# Generate Go and C++ code
buf generate proto/go build -o bin/ingestion-service ./cmd/ingestion-servicecd cpp
mkdir build && cd build
cmake ..
makeSee docs/DEPLOYMENT.md for production deployment guide.
- Architecture — System design, layers, data flow
- Schema — Data contract, API specs, constraints
- Development Setup — Local setup and testing
- Deployment — Production deployment
- Protobuf changes: Run
buf lintandbuf generatebefore committing - Go changes: Run
go fmt,go vet, and tests before committing - C++ changes: Compile with no warnings, run tests
(Add your license here)
Current Phase: Phase 1 - Protobuf Schema Definition (In Progress)
Timeline:
- Phase 1: Schema definition and code generation ← Active
- Phase 2: Go ingestion service + worker pool
- Phase 3: NATS JetStream integration
- Phase 4: C++ storage engine
For questions or issues, reach out via issues or PRs.