entidb_sync_protocol

Crates.ioentidb_sync_protocol
lib.rsentidb_sync_protocol
version2.0.0-alpha.3
created_at2025-12-25 14:47:02.787605+00
updated_at2026-01-03 03:34:41.054437+00
descriptionSync protocol types and CBOR codecs for EntiDB
homepage
repositoryhttps://github.com/Tembocs/entidb
max_upload_size
id2004620
size71,033
Tembo (Tembocs)

documentation

README

entidb_sync_protocol

Sync protocol types and CBOR codecs for EntiDB.

Overview

This crate defines the sync protocol message types and their canonical CBOR serialization for EntiDB's offline-first synchronization system.

Features

  • Protocol types: Complete set of sync operation types (Put, Delete, Tombstone)
  • CBOR codecs: Canonical encoding/decoding for all message types
  • Version vectors: Clock-based conflict detection primitives
  • Cursor management: Server and client cursor types

Design Principles

  • Pure types: No I/O, no networking - just types and codecs
  • Canonical encoding: Deterministic CBOR for consistent hashing
  • Language-agnostic: Can be reimplemented in any binding language

Protocol Operations

use entidb_sync_protocol::{SyncOperation, OperationType};

// Operations are canonical CBOR-encoded
let op = SyncOperation::new(
    entity_id,
    OperationType::Put,
    Some(entity_bytes),
    clock,
);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 0

cargo fmt