tags : Local First Software (LoFi), Distributed Systems
Different Architectures
FAQ
How does Figma do it?
- “Our servers currently spin up a separate process for each multiplayer document which everyone editing that document connects to.”
How does PartyKit do it?
“With a model like PartyKit, building a system that can synchronise state is straightforward: Hold that state in memory, let websockets (or http requests!) connect to the same process. When clients “send” changes to said state, broadcast those changes to all connected clients. Depending on the usecase, you can use fancier data structures to model the state (like CRDTs or OTs), setup state machines to model workflows, or use a pubsub model to broadcast events.”
- This draws the boundaries nicely about the network aspect, and the managing the state Aspect.
Some Usecases
- See https://sunilpai.dev/posts/the-future-of-serverless/
- Multiplayer
- A single person with multiple devices can be multiplayer, would expect their devices to be in sync