Big Tay
Big Tay
CDCloudflare Developers
Created by Big Tay on 11/23/2024 in #hyperdrive
GitHub - shadrach-tayo/cloudflare-worker...
The sync server is used to coordinate WebSocket connections between 2 or more clients working on the same Automerge document. So I migrated this to use cloudflare durable objects to isolate clients by their document ID, kind of similar to isolated chat rooms. For Automerge this not only helps us scale better (spining up new DurableObject instance for each Automerge document being worked on in realtime to sync up all clients (including our own backend that make calls to get latest version of documents at times), It also prevents overloading each session with more that one document handle in memory and prevents leaking document between clients connected to the sync server without having to setup authentication in the document share policy (this will introduce frequent network trips to the backend). Also if a collaborative session crashes the server for a reason it doesn't affect the other sessions as they're all isolated thanks to DurableObjects.
3 replies
CDCloudflare Developers
Created by lbguilherme on 5/20/2024 in #workers-help
Does Smart Placement support Hyperdrive? I'm using Next.js with Postgres
how did you get this to work on dev?
7 replies