Hacker News new | ask | show | jobs
by vnglst 1684 days ago
Nice, I like how short and simple it is. The title seems to imply it runs on multiple datacenters. How does it sync messages between those?
3 comments

I was also wondering how this worked, and the following Deno Deploy documentation explains it: https://deno.com/deploy/docs/runtime-broadcast-channel/#broa...
I believe the BroadcastChannel implements the server-side distributed messaging.
Neat, it’s a server-side implementation of the browser API for tab-to-tab communication.

https://deno.com/deploy/docs/runtime-broadcast-channel/

    class BroadcastChannel
      return `system('ircd')`
    end
Only three lines! :D
Right, as jitl suggested. The BroadcastChannel is used to allow cross-datacenter messaging. So every script instance has its own set of clients and forwards incoming client messages to other script/datacenter instances.

I suppose this is not limited to multiple datacenters, but to multiple script instances in one datacenter as well.