News for hackers. Stuff that matters.
Re:The Hidden Complexity of Scaling WebSockets by melchizedek6809 on Saturday January 25, 2025 @06:44AM (#42821078)
Why can't the server send unsolicited messages in JSON-RPC? I've implemented bidirectional JSON-RPC in multiple projects and things work just fine, even going as far as sharing most of the code.
Re:The Hidden Complexity of Scaling WebSockets by crabmusket on Saturday January 25, 2025 @08:29AM (#42821521)
Yep, the web server and client can both act as JSON-RPC servers and clients. I've used this pattern before too with Web Workers, where the main thread acts as both client (sending requests to the worker) and server (fielding requests from the worker).