liveBook · Manning

Client-server architecture

As explained in Building User-Friendly DSLs

A software architecture in which clients request services or data from a server that provides them.

Client–server architecture coordinates shared editing through a central server. Each collaborator’s device sends changes to the server, which broadcasts accepted changes to the other devices so their content stays synchronized. section 10.1

A collaborative editing flow typically works as follows:

  • A collaborator edits local content, usually producing a small change such as a few keystrokes. section 10.1
  • The client sends the change immediately to the central server. section 10.1
  • The server checks the change against current content before broadcasting it. section 10.1
  • When changes conflict, the server keeps the change received first, rolls back the other collaborator’s change, and lets it be redone. section 10.1

Shared document editing

Two collaborators edit the same document from separate devices. Network latency allows both to edit before receiving the other’s update; the server detects the conflict, broadcasts only the winning change, and rolls back the losing edit. section 10.1

{ 
    "changeType": "valueUpdate", 
    "objectID": "<ID>", 
    "propertyName": "name", 
    "newValue": "bar", 
    "oldValue": "foo" 
}

A structured change record can carry the change type, object identifier, property name, new value, and old value. section 10.1

How Building User-Friendly DSLs covers it

How deep it goes
Explains client updates, server broadcasting, latency conflicts, rollback, and first-arrival resolution, while deferring CRDT-based conflict prevention.
Examples
Uses shared document editing, keystroke-sized changes, rollback, and structured property-update records.
What you can do after
Evaluate/understand centralized synchronization and first-arrival conflict handling in collaborative editing.
How it connects
Connects real-time collaborative editing, network latency, conflict resolution, CRDTs, and peer-to-peer communication.

Also explained in

Compare how 5 books explain client-server architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building User-Friendly DSLs. The section links point to the parts of the book it draws on.