new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Supabase · Realtime · all subjects

broadcast

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

realtime.messages table is partitioned by day with 3-day retention

The realtime.messages table is partitioned by day. This allows old messages to be deleted performantly by dropping old partitions. Partitions are retained for 3 days before being deleted.

Broadcast works globally across Realtime clusters

Broadcast lets you send a message from any connected client to a Channel. Any other client connected to the same Channel will receive that message. This works globally. A client connected to a Realtime node in the United States can send a message to another client connected to a node in Singapore. If clients are close to a Realtime node they'll get Broadcast messages in the time it takes to ping the cluster.

Broadcast from Postgres uses realtime.messages table

Realtime Broadcast sends messages when changes happen in your database. Behind the scenes, Realtime creates a publication on the realtime.messages table. It then reads the Write-Ahead Log (WAL) file for this table and sends a message whenever an insert happens. Messages are sent as JSON packages over WebSockets.

realtime.send function

The realtime.send function inserts an entry into the realtime.messages table that will trigger the replication slot to broadcast changes to clients. It also captures errors to prevent the trigger from breaking.

realtime.send_binary function

The realtime.send_binary function is similar to realtime.send but allows you to broadcast binaries.

Give your agent this brain