ElectricSQL implements active-active, conflict-free replication between SQLite and Postgres, via AntidoteDB. Replication from SQLite, within a local app, is handled transparently, in the background as a side effect of electrifying your database driver.
As a result, as a developer, you don’t need to do anything special to enable or control replication. It just happens in the background. However, there are a number of things that it’s useful to be aware of and to potentially configure and control.
As described in the configuration guide, you can configure the
url that the local app connects to when establishing replication.
The core replication layer uses AntidoteDB. This provides transactional causal+ consistency with CRDTs. Rows are stored as an antidote_crdt_map_rr (a CRDT map that supports deletes using a reset mechanism). Replicated updates always contain the whole row.