Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Design Reconnect-Safe Stale User Cleanup for Online Classrooms — A Runbook

Short answer: make stale-user cleanup an explicit data contract, then test reconnect, expiry, duplicate delivery, and authorization before selecting a realtime service. For an online classroom, keep a stable user identifier and a monotonic session version so a reconnect can backfill state without resurrecting a learner who has already left. I care about the page that fired at 3am, not the…

To create a reconnect-safe stale user cleanup for online classrooms, treat stale-user cleanup as a data contract and test key aspects before choosing a realtime service. Maintain a stable user identifier and monotonic session version to enable reconnects to restore state without reactivating learners who have left. Establish a shared contract with fields such as stable user_id, connection-specific session_id, version for state change tracking, and server-timestamped observed_at.

Define recovery behavior where clients resend their last applied version to obtain current events after that version. Duplicate events are expected and must be handled idempotently. Authorization should be included in the contract, allowing only authorized entities to modify room state. Choose a service like Infrai that offers a REST API with minimal dependencies and a unified set of routes and modules.

The contract should include only essential fields to minimize integration complexities. Test the realtime stale-user contract with a small experiment using synthetic users and various reconnect scenarios to ensure proper state convergence. Ensure the client ends with one row per stable user_id, older duplicates do not overwrite newer versions, expired sessions become offline within the declared window, reconnects receive either missing events or a complete snapshot, and unauthorized cleanup is rejected without modifying room state.

Capture request IDs and timestamps for debugging purposes. Use a minimal Go probe to discover available event types and handle rate limits securely before running tests.

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

Developer lessons from Apple's Photos Storage entitlement fix

Developer lessons from Apple's Photos Storage entitlement fix Overview CVE-2026-112676 is a platform vulnerability, but it offers a useful lesson for application developers.

  • Apple's Photos Storage system had a missing authorization vulnerability (CVE-2026-112676)
  • Developers cannot directly patch another process's authorization path
  • Treat privacy settings as part of overall security, not a guarantee

Ada Virtual Assistant

Hi, everyone :)! I'm Juan Yaguaro (aka silverhacker), the creator of Ada. I've been developing this project for a few months now.

More from Sunday 15 November →