Architecture
High-Level Flow
- Client connects to
gatewayon MongoDB wire protocol. - Gateway authenticates and dispatches commands.
- Coordinator decides hot, cold, or federated execution.
- Storage Engine and/or Query Engine execute.
- Coordinator merges and returns a MongoDB-compatible response.
Request Ownership
| Request Type | Primary Owner |
|---|---|
| Handshake, auth, command parsing | Gateway |
| Query routing/merge/cursor orchestration | Coordinator |
| Hot writes and canonical query/update semantics | Storage Engine |
| Cold object-store scans and pushdown | Query Engine |
| Lifecycle archival + backup/restore orchestration | Controller |
Primary Code Anchors
- Gateway dispatch:
services/gateway/src/proxy/handler/mod.rs - Gateway command catalog:
services/gateway/src/proxy/handler/handshake.rs - Coordinator orchestration:
services/coordinator/internal/server/server.go - Storage aggregation/filter/update execution:
services/storage-engine/src/aggregation/pipeline.rs,services/storage-engine/src/filter/evaluator.rs - Query-engine cold execution:
services/query-engine/src/grpc/service.rs
Operational Topologies
- Local single-node:
docker-compose.yml - Local cluster E2E:
docker-compose.yml+docker-compose.e2e.yml - Kubernetes/Cloud:
deploy/helm,deploy/kustomize,deploy/terraform
Verification Gates
- Unit/integration/compatibility:
make test,make test-integration,make test-compatibility - E2E topologies:
make e2e-single,make e2e-local-cluster - MQL matrix:
make mql-exhaustive,make mql-coverage-audit