#conflict #p2p #sea-orm #write-operations #schema-builder #conflict-resolution #gossipsub #database-connection #logical-clock

wavesyncdb

WaveSyncDB is a lightweight, distributed database synchronization engine designed to bridge the gap between real-time data streaming and relational storage. It ensures high-consistency data replication across decentralized nodes with a focus on low-latency updates.

2 unstable releases

Uses new Rust 2024

new 0.3.0 Mar 3, 2026
0.2.0 Dec 23, 2025

#2 in #gossipsub

GPL-3.0-or-later

56KB
1K SLoC

wavesyncdb

Core library for WaveSyncDB — transparent peer-to-peer sync for SeaORM applications.

Features

  • Connection wrapperWaveSyncDb implements SeaORM's ConnectionTrait, intercepting writes transparently
  • P2P sync — libp2p gossipsub with mDNS discovery, QUIC and TCP transports
  • LWW conflict resolution — hybrid logical clocks with deterministic tiebreakers
  • Persistent sync log_wavesync_log table tracks all operations for incremental sync
  • Schema builder — fluent API to register entities for sync or local-only use

Usage

use sea_orm::*;
use wavesyncdb::WaveSyncDbBuilder;

let db = WaveSyncDbBuilder::new("sqlite:./app.db?mode=rwc", "my-topic")
    .build()
    .await?;

// Register entities for sync
db.get_schema_registry(module_path!().split("::").next().unwrap())
    .sync()
    .await?;

// Use standard SeaORM operations — sync happens automatically
let task = task::ActiveModel { /* ... */ };
task.insert(&db).await?;

See the root README for full documentation, architecture overview, and Dioxus integration.

License

GPL-3.0-or-later

Dependencies

~53–96MB
~1.5M SLoC