photoncloud-monorepo/specifications/flaredb/001-distributed-core/research.md

1.2 KiB

Research: Core Distributed Architecture (Phase 1)

Decision: Use rocksdb crate for local storage engine. Rationale: Industry standard for LSM-tree storage. Provides necessary primitives (WriteBatch, Column Families) for building a KV engine. tikv/rust-rocksdb is the most mature binding. Alternatives considered: sled (pure Rust, but less mature/performant for this scale), mdbx (B-tree, read-optimized, not suitable for high write throughput target).

Decision: Use tonic + prost for gRPC. Rationale: De facto standard in Rust ecosystem. Async-first, integrates perfectly with tokio. Alternatives considered: grpc-rs (C-core wrapper, complex build), tarpc (Rust-specific, less interoperable).

Decision: Use tokio as async runtime. Rationale: Required by tonic. Most mature ecosystem.

Decision: Monorepo Workspace Structure. Rationale: Allows atomic commits across protocol, server, and client. Simplifies dependency management during rapid early development (Agility Principle).

Clarification Resolution

No [NEEDS CLARIFICATION] items were present in the spec. Technical context was sufficiently defined in the chat history.