CloudSync SDK¶
Real-time data synchronization across distributed systems.
What is CloudSync?¶
CloudSync SDK provides a lightweight, high-performance framework for synchronizing structured and unstructured data across distributed nodes in real time. Built on top of conflict-free replicated data types (CRDTs), CloudSync guarantees eventual consistency without requiring centralized coordination.
Key Features¶
- Real-time sync — Sub-100ms propagation latency across regions
- Conflict resolution — Automatic CRDT-based merge with configurable strategies
- Offline support — Local-first architecture with automatic reconciliation
- Multi-transport — WebSocket, gRPC, and MQTT out of the box
- End-to-end encryption — AES-256-GCM with per-session key rotation
- Pluggable storage — SQLite, PostgreSQL, Redis, and custom adapters
- Language SDKs — Python, Go, TypeScript, and Rust
Quick Example¶
from cloudsync import CloudSyncClient
client = CloudSyncClient(
api_key="cs_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ",
region="us-east-1"
)
# Create a synchronized document
doc = client.document("user-preferences")
doc.set({"theme": "dark", "language": "en"})
# Listen for real-time changes
@doc.on("change")
def on_change(event):
print(f"Field '{event.field}' changed to '{event.value}'")
client.connect()
Architecture Overview¶
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Client SDK │◄───►│ CloudSync Edge │◄───►│ Client SDK │
│ (Node A) │ │ (Relay Server) │ │ (Node B) │
└──────┬───────┘ └────────┬─────────┘ └──────┬───────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────────┐ ┌──────────────┐
│ Local Store │ │ Conflict Engine │ │ Local Store │
│ (SQLite) │ │ (CRDT Resolver) │ │ (SQLite) │
└──────────────┘ └──────────────────┘ └──────────────┘
Getting Started¶
Head to the Installation guide to set up CloudSync in under 5 minutes, or jump straight to the Quick Start tutorial.
Current Version
The latest stable release is v3.4.2 (released January 12, 2025). See the Changelog for details.