Urgent.News

What's breaking now, across thousands of outlets.

Tech

Realtime Channel and Message Queue Durability for Collaborative Cursor Notifications

A realtime channel makes a collaborative cursor notification immediate; a message queue makes its recovery durable. The awkward constraint is that replaying every old coordinate after a reconnect is usually wrong. The durable thing is not an endless trail of mouse movements. It is the latest useful state, plus enough ordering information to reject stale updates. Short answer: use a realtime…

Realtime channels and message queues are used together to ensure durability in collaborative cursor notifications. A realtime channel enables immediate cursor updates, while a message queue guarantees durability by storing the latest useful state and ordering information. Publishing to a channel without subscribers yields no results.

The durable queue is resilient to service downtime and offline periods, making it the record, while the realtime channel serves as the fast path. When a SaaS allows missed state, splitting the functionality between the two paths is justified. However, if missed state affects the product, such as in a shared game editor, it is essential to have a deterministic way to establish the current state for each collaborator.

The choice between using a realtime channel or a message queue for notification durability depends on the importance of maintaining accurate cursor motion. The recommended solution is to use a monotonically increasing revision number per editor and user for each cursor update. The latest state should be persisted, and the same state should be sent over the live path.

Upon connection or reconnection, the client should read the durable snapshot first, subscribe to the channel, and ignore any events with a revision no newer than the rendered state. This approach ensures that delayed updates are discarded, avoiding unintended backward cursor movements or frozen cursor positions. The provided TypeScript example demonstrates the protocol without relying on a vendor SDK, making it a practical implementation of the described boundaries.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Turned My Coding Interview Into a Jedi Mind Trick

The Quest Begins (The “Why”) I still remember my first technical interview like it was yesterday. I sat down, the interviewer tossed over a whiteboard marker, and the problem appeared: “Given an array…

  • Author overcame interview anxiety by mastering "Think Aloud with a Three‑Pass Script"
  • Restate problem, outline approach, code with narration systematically reveals thought process
  • Technique transforms coding interviews into collaborative problem‑solving, not interrogations

Your Discord bot's member cache is lying to you. Mine never timed out a single member.

I set largeThreshold: 50 in my Discord bot's client config. The comment next to it said it saved memory with no functional loss. That was wrong, and it took a log search to find out how wrong.

  • Discord bot's member cache incomplete, missing offline members
  • LargeThreshold config setting causes functional loss
  • Author resolved by separate table for pending verification

Build a restaurant homepage with Webbit, a free Windows website editor

I made Webbit for people who want to edit a website visually while keeping ordinary HTML, CSS and JavaScript files. It’s a free Windows app, currently in Beta 1.

  • Select restaurant template from New site → Restaurants → Restaurant & café
  • Customize headline to "Fresh plates" using Content → Text / label
  • Style "Visit" button with green background-color #245b45 and rounded ends

More from Wednesday 30 September →