Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
electric-sql
on the starter templatePublished by github-actions[bot] about 1 year ago
69d13c4: Rewritten the Electric sync layer to remove Vaxine and enable partial replication
This release encompasses quite a bit of work, which resulted in a complete overhaul of the current system. It's hard to note all changes, see git history for that, but this public release
marks the first somewhat stable version of the system for which we intend incremental changes.
That said, this is still considered an unstable release and so this is only a minor version bump.
We intend to keep this and the electric-sql
typescript library somewhat in sync on minor versions up to 1.0.0
: new features that require both server-side support as well as client-side support are going to result in a minor-level version bump on both, while features/improvements that don't need both sides will be marked as a patch version.
Rough change list between previous version and this one:
f8cf910: Remove SchemaRegistry and use our cached knowledge of the pg schema to fulfill all requirements for knowledge of the replicated tables
5fe00af: Fixed sync from subscription not respecting electric_user_id
filtering
afaedcd: Make some configuration option names more descriptive. Namely,
ELECTRIC_HOST
to LOGICAL_PUBLISHER_HOST
POSTGRES_REPLICATION_PORT
to LOGICAL_PUBLISHER_PORT
STATUS_PORT
to HTTP_API_PORT
The first two options together define the host:port pair that the PostgreSQL database will connect to
in order to start following Electric's logical replication stream that publishes inbound changes from all clients.
The HTTP_API_PORT
option is now more aptly named since Electric exposes more than just the status endpoint
on that port.
6026ced: Update all deps that had new backwards-compatible versions
11acadd: Allow for enabling SSL for PG connections via an env variable
57324c4: Add server-side validation of row values incoming from Satellite clients
089968d: Fixed the issue whereby calling electrify() on a previously electrified table caused a duplicate migration to be created and put onto the replication stream.
f60ce16: Implemented correct semantics for compensations to work across the stack
3cf2bc2: Support for intersecting shape subscriptions
8b8cc93: Fix a bug in schema version validation
e17b37e: Fix the bug where the client failed to restart the replication connection after completing the initial sync once.
2e8bfdf: Fixed the client not being able to reconnect if the migrations were preloaded and the only operation was a subscription. In that case the client have never received any LSNs (because migrations didn't need to be sent), so reconnection yielded errors due to missing LSN but existing previously fulfilled subscriptions. We now send the LSN with the subscription data so even if it's the first and only received message, the client has enough information to proceed.
e4cbf80: Update Elixir to 1.15.4 to fix remote shell
571119a: Add a validation step in the electrify() function that only lets tables with supported column types to be electrified
3ca4917: Fixed an issue where sometimes subscription data would not be sent in absence of other writes to PG
00d5a67: Add server-side enforcement of "NOT NULL" for values incoming from Satellite clients
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
69d13c4: Large rewrite, that introduces Data Access Library, client-side migration application, and subscriptions.
This release encompasses quite a bit of work, but this is still considered an unstable release and so this is only a minor version bump.
We intend to keep this and the components/electric
server sync layer somewhat in sync on minor versions up to 1.0.0
: new features that require both server-side support as well as client-side support are going to result in a minor-level version bump on both, while features/improvements that don't need both sides will be marked as a patch version.
Data access library exposes a prisma-like interface to interact with SQLite (any platform works, including web). On top of that, we introduce a .sync()
interface which establishes a subscription with the server to get initial data and changes for the tables we're interested in.
Server now knows how to send migrations to the clients as soon as they get applied to the underlying PostgreSQL database, and this client version applies them to the local database.
Server now knows how to handle subscriptions and reconnection a bit better, which the client makes use of (in particular, this heavily improves initial sync performance).
liveMany
, liveUnique
, and liveFirst
functions not exposing the include
tables properly, making useLiveQuery
miss some relevant updatesuseConnectivityState
hook.https:
protocol in service connections for CLI.sync()
calls before the replication is established. Now we defer trying to subscribe until the replication is succesfully established if we're already in the process of connecting and starting.wa-sqlite
driver to use the WebSocketFactory
..sync()
function when page reloads establishing a new subscription alongside existing one. Now we deduplicate subscription requests by hash of their contents, so no two exactly the same subscriptions are possible. This also solves calling <table>.sync()
many times in multiple components - they will return the same promise.better-sqlite3
to dependencies because CLI command uses it_getMeta
types more preciseliveQuery
not working as expectedconfig.url
parsing and SSL support.useEffect
returned functions and in close
method of SatellitePublished by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
5fe00af: Fixed sync from subscription not respecting electric_user_id
filtering
afaedcd: Make some configuration option names more descriptive. Namely,
ELECTRIC_HOST
to LOGICAL_PUBLISHER_HOST
POSTGRES_REPLICATION_PORT
to LOGICAL_PUBLISHER_PORT
STATUS_PORT
to HTTP_API_PORT
The first two options together define the host:port pair that the PostgreSQL database will connect to
in order to start following Electric's logical replication stream that publishes inbound changes from all clients.
The HTTP_API_PORT
option is now more aptly named since Electric exposes more than just the status endpoint
on that port.
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
liveMany
, liveUnique
, and liveFirst
functions not exposing the include
tables properly, making useLiveQuery
miss some relevant updatesuseConnectivityState
hook.better-sqlite3
to dependencies because CLI command uses it_getMeta
types more preciseconfig.url
parsing and SSL support.useEffect
returned functions and in close
method of SatellitePublished by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
wa-sqlite
driver to use the WebSocketFactory
.liveQuery
not working as expectedPublished by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
.sync()
calls before the replication is established. Now we defer trying to subscribe until the replication is succesfully established if we're already in the process of connecting and starting..sync()
function when page reloads establishing a new subscription alongside existing one. Now we deduplicate subscription requests by hash of their contents, so no two exactly the same subscriptions are possible. This also solves calling <table>.sync()
many times in multiple components - they will return the same promise.