Differential Synchronization Simulator

by Doug Martin

This is a simulation of Neil Fraser's "Differential Synchronization" algorithm using the "Guaranteed Delivery Method". To see it in action type text into any of the three client text textareas.

A simple protocol has been layered on top of Neil Fraser's algorithm to allow it to be used with bi-directional transports like WebSockets or abstractions like socket.io. When clients want to update the server they send a "saveEdits" command to the server with the array of edits to save. The server responds asynchronously with a "savedEdits" command that contains the client versions saved along with any other new edits avaialble from other clients. The server also sends an "editsAvailable" message to all the other clients who them in turn send "getEdits" commands. The client API is structured such that only one command can be outstanding and "saveEdits" have priority over "getEdits".

The speed of the network and the client diff checks can be changed to speed up or slow down the simulation to see how data are updated.

NOTE: The probability settings are disabled for now because they are still in development along with the code to simulate network timeouts.

Clients

Diff Check Speed (per second)

Client 1

Client version: 0
Server version: 0
Active edits: 0

Text

Shadow

Client 2

Client version: 0
Server version: 0
Active edits: 0

Text

Shadow

Client 3

Client 1 version: 0
Server version: 0
Active edits: 0

Text

Shadow


Network

Queue

Log (Reverse Order)

Packet Speed (per second)

Duplicate Packet Probability

Lost Packet Probability

Out of Order Packet Probability


Server

Server version: 0

Text

Client 1

Client version: 0
Server version: 0
Backup version: 0
Active edits: 0

Shadow

Backup Shadow

Client 2

Client version: 0
Server version: 0
Backup version: 0
Active edits: 0

Shadow

Backup Shadow

Client 3

Client version: 0
Server version: 0
Backup version: 0
Active edits: 0

Shadow

Backup Shadow