ormdb-proto
Wire protocol definitions for ORMDB with zero-copy serialization.
Overview
ormdb-proto defines the binary protocol used for client-server communication in ORMDB. It provides:
- Query IR - Typed intermediate representation for graph queries
- Mutation IR - Structured mutation operations
- Result Types - Typed response structures
- Zero-Copy Serialization - Using
rkyvfor minimal overhead
Features
- Zero-copy deserialization with
rkyv - Strongly typed query and mutation structures
- Efficient binary encoding
- Serde support for JSON interop
Usage
use ;
// Build a typed query
let query = new
.filter
.include;
// Serialize for wire transport
let bytes = query.to_bytes?;
// Zero-copy deserialization
let archived = from_bytes?;
Protocol Structure
Request
├── Query
│ ├── entity: String
│ ├── filter: Filter
│ ├── include: Vec<Include>
│ └── options: QueryOptions
└── Mutation
├── Create { entity, data }
├── Update { entity, filter, data }
└── Delete { entity, filter }
Response
├── QueryResult { rows, shape }
├── MutationResult { affected, returning }
└── Error { code, message }
License
MIT License - see LICENSE for details.
Part of the ORMDB project.