postgres_crdt
3.0.3, released 2 years ago by cachapa.net
Dart CRDT client for PostgreSQL
What it does
Provides conflict‑free replicated data types over a PostgreSQL database, enabling distributed, conflict‑free synchronization of data.
AI-written summary of version 3.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to sync data across multiple nodes using PostgreSQL
- You want conflict‑free replication without writing custom merge logic
- You need efficient bulk writes and prepared statements for large datasets
Skip it when
- You are not using PostgreSQL
- You need a lightweight local storage solution
- You require a fully managed backend service like Firebase
Strengths
- Performance refactor with prepared statements
- Efficient bulk writes
- Custom node IDs and HLC support
- Comprehensive changelog with bug fixes
Weaknesses
- Only works with PostgreSQL
- Requires careful async handling
- No built‑in UI or higher‑level abstractions
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 2
Add postgres dependency, configure PostgreSQL instance, await async calls, optionally enable unawaited_futures linter warning
import 'package:postgres_crdt/postgres_crdt.dart';
final api = CrdtApi('postgres://user:pass@localhost:5432/db');
await api.connect();
final changeset = await api.getChangeset();
await api.applyChangeset(changeset);Alternatives
Packages that do the same job and could replace postgres_crdt.
- asset_cache
Load and cache any asset type with a custom decoder
52Compare
Works with
Packages commonly used together with postgres_crdt: ones it builds on, ones built on it, and its own family.
- postgrespostgres_crdt depends on itPostgreSQL driver for Dart supporting binary protocol, pooling and statement reuse.
- sql_crdtpostgres_crdt depends on itBase package for Conflict-free Replicated Data Types using SQL databases
- sqlite_crdtSame familyDart implementation of Conflict-free Replicated Data Types (CRDTs) using Sqlite