Skip to content

Commit

Permalink
feat!: server-driven unsubscribes (#1240)
Browse files Browse the repository at this point in the history
1. Adds new boundary messages to the protocol allowing the server to
send a GONE batch - a set of messages for the client to know that those
rows will not receive further updates after an unsubscribe call.
2. Server is the source of truth on which rows the client should have
3. Only while-online unsubscribes are possible
4. Client may reconnect at any point after sending the unsubscribe call
and the server will adjust seen rows correctly and send a GONE batch if
we don't believe the client had seen that -- see tests in
`subscriptions_test.exs`.

Missing is a public API for unsubscribes, that's in the next commit.
  • Loading branch information
icehaunter committed May 16, 2024
1 parent 5f40b96 commit a8eedad
Show file tree
Hide file tree
Showing 35 changed files with 2,773 additions and 298 deletions.
6 changes: 6 additions & 0 deletions .changeset/large-jars-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@core/electric": minor
"electric-sql": minor
---

feat: server-driven unsubscribes to allow clients to unsubscribe from shapes
Loading

0 comments on commit a8eedad

Please sign in to comment.