You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`Channel` has a new constructor that uses `ChannelOptions`
17
-
-`Channel.Parameters` has been changed in favor of `Channel.Options`
18
-
-`Channel` and `Push` are now directly dependent on having `Socket` and `SerializerSettings` passed in as opposed to referencing the `Singleton` instance.
19
-
-All publicly facing classes (that offer functionality) now include an Interface.
20
-
21
-
In reality, not much should affect the developer as most of these classes/methods are only being referenced internally by the `Client`. The removal of the Singleton aspect may offer some design changes for those leveraging this library by itself (as opposed to using it only in supabase-csharp.)
"Broadcast follows the publish-subscribe pattern where a client publishes messages to a channel with a unique identifier. For example, a user could send a message to a channel with id room-1.
83
+
84
+
Other clients can elect to receive the message in real-time by subscribing to the channel with id room-1. If these clients are online and subscribed then they will receive the message.
85
+
86
+
Broadcast works by connecting your client to the nearest Realtime server, which will communicate with other servers to relay messages to other clients.
87
+
88
+
A common use-case is sharing a user's cursor position with other clients in an online game."
89
+
90
+
[Find more information here](https://supabase.com/docs/guides/realtime#broadcast)
91
+
92
+
**Given the following model (`CursorBroadcast`):**
"Presence utilizes an in-memory conflict-free replicated data type (CRDT) to track and synchronize shared state in an eventually consistent manner. It computes the difference between existing state and new state changes and sends the necessary updates to clients via Broadcast.
134
+
135
+
When a new client subscribes to a channel, it will immediately receive the channel's latest state in a single message instead of waiting for all other clients to send their individual states.
136
+
137
+
Clients are free to come-and-go as they please, and as long as they are all subscribed to the same channel then they will all have the same Presence state as each other.
138
+
139
+
The neat thing about Presence is that if a client is suddenly disconnected (for example, they go offline), their state will be automatically removed from the shared state. If you've ever tried to build an “I'm online” feature which handles unexpected disconnects, you'll appreciate how useful this is."
140
+
141
+
[Find more information here](https://supabase.com/docs/guides/realtime#presence)
"Postgres Changes enable you to listen to database changes and have them broadcast to authorized clients based on [Row Level Security (RLS)](https://supabase.com/docs/guides/auth/row-level-security) policies.
185
+
186
+
This works by Realtime polling your database's logical replication slot for changes, passing those changes to the [apply_rls](https://github.com/supabase/walrus#reading-wal) SQL function to determine which clients have permission, and then using Broadcast to send those changes to clients.
187
+
188
+
Realtime requires a publication called `supabase_realtime` to determine which tables to poll. You must add tables to this publication prior to clients subscribing to channels that want to listen for database changes.
189
+
190
+
We strongly encourage you to enable RLS on your database tables and have RLS policies in place to prevent unauthorized parties from accessing your data."
191
+
192
+
[Find More Information here](https://supabase.com/docs/guides/realtime#postgres-changes)
0 commit comments