BlogPricing

Real-time multiplayer sync sequence

A sequence diagram for a collaborative editor: client applies an edit optimistically, sends it to the server, server resolves conflicts and broadcasts to other clients. Includes a rebase step on conflict.

Start for free
Sequence diagram previewReal-time multiplayer sync sequence
Recreate this in Raltey

Copy this prompt

Paste this into Raltey's AI agent to generate the same diagram, then tweak it on the canvas.

Prompt
Create a sequence diagram for real-time multiplayer sync. Actors: Client A, Client B, Server. Client A applies an edit optimistically and sends the op with its base_version. Server resolves against the latest version, acks Client A with new_version, broadcasts a patch to Client B which applies it. Show a second path where Client A sends a conflicting op with a stale base; Server rejects, sends a rebase patch, Client A rebases and retries.

Context

  • - Optimistic updates for snappy UX.
  • - Server is the conflict-resolution authority.
  • - All other clients receive the resolved patch.

Patterns

  • - Optimistic UI on the originating client.
  • - Server-authoritative conflict resolution.
  • - Rebase + retry on conflict.
Diagram structure

Nodes and connections

Client A
Client B
Server
Connections
Client AClient AApply edit locally (optimistic)
Client AServerSend op + base_version
ServerServerResolve against latest version
ServerClient AAck with new_version
ServerClient BBroadcast patch
Client BClient BApply patch
Client AServerSend conflicting op + stale base
ServerClient AReject + send rebase patch
Client AClient ARebase and retry

Notes from the field

Frequently asked

When do I need CRDTs vs OT?

For text editors, CRDTs are the modern default (Yjs, Automerge). For more constrained domains (a Kanban board), simple op-based sync is enough.

How do I handle offline edits?

Queue ops locally with their base_version. When the client reconnects, replay them through the same conflict path.

More templates

Open this template in Raltey

Edit it on the canvas, ask the AI agent to extend it, then share or export.

Start for free