3 ms·
Best case, the players are co-located in a city or country, and they'll benefit from data center locality. Worst case, they're not co-located, and one particip
by crabmusket 2y ago
Best case, the players are co-located in a city or country, and they'll benefit from data center locality.
Worst case, they're not co-located, and one participant has good latency, and the other doesn't. This is equivalent to the "deploy the backend in a single server/datacenter" approach.
Aside from the data locality, I still find the programming model (a globally-unique and addressable single-threaded class instance) to be quite nice, and would want to emulate it even without the Cloudflare edge magic.
- paulgb 2y ago> Aside from the data locality, I still find the programming model (a globally-unique and addressable single-threaded class instance) to be quite nice, and would want to emulate it even without the Cloudflare edge magic. You might be interested in Plane (https://plane.dev/ https://plane.dev/ / https://github.com/jamsocket/plane https://github.com/jamsocket/plane), which we sometimes describe as a sort of Durable Object-like abstraction that can run anywhere containers can. (I'm also one of the articles you linked, thanks for the shoutout!)
- crabmusket 2y agoI am interested, and I really enjoy your work on Browsertech! I haven't needed Plane above/over what Cloudflare is providing, but I've got it in the back of my mind as an option. I've long hoped other providers might jump on the Durable Objects bandwagon and provide competing functionality so we're not locked in. Plane/Jamsocket looks like one way to go about mitigating that risk to a certain extent.
- tlarkworthy 2y agoIt's the actor model essentially. You can have a DO proxy each user connection, then they forward messages to the multipler document. The user proxy deals with ordering and buffering their connection message state in the presence of disconnects, and the document DO handles the shared state.
- crabmusket 2y agoIt's actors plus a global routing system that means all messages addressed to a unique identifier will arrive in the actor instance. I haven't seen any other actor frameworks that provide that.
- tlarkworthy 2y agoAkka and Erlang both support distributed routing to their actors, but this is planetary scale and fully-managed out of the box, which is very cool.