How does real-time interaction with multiple clients work in the system using operational transformations with a central server?

I just finished reading High-Latency, Low-Bandwidth Windowing in the Jupiter Collaboration System , and I basically kept track of everything until part 6: global consistency. This part describes how the system described in the document can be expanded to accommodate multiple clients connected to the server. However, the explanation is very short and essentially says that the system will work if the central server simply redirects client messages to all other clients. I really don't understand how this works. What status vector will be sent in the message that will be sent to all other clients? Does the server support separate state vectors for each client? Does it support a separate copy of widgets locally for each client?

A simple example I can think of is this setup: imagine client A, server and client B with client A and client B, which are both connected to the server. To begin with, all three state objects are "ABCD". Then client A sends a message β€œinsert character F to position 0” at the same time, client B sends a message β€œinsert character G to position 0” to the server. It seems that just relaying the client message to client B and vice versa is not up to the task. So what does the server do?

+6
client-server real-time collaboration
source share
1 answer

I really understood how this would work. In my example, the server saves the state space for both client A and client B. In the case when the server first receives a client message, the server receives a message with a state vector (0, 0), inserts F, and then updates its state vectors ( 1, 0) and (0, 1) for A and B, respectively (where the first number is the number of messages from the processed client, and the second is the number of messages from the server that were processed). Then the server sends "insert F to position 0" with the state vector (0, 0) (since it was the state of the server in state space B when the message was received by the server) and receives "insert G to position 0" from B sent with state (0, 0). Since the server is in state (0, 1) in the state space B, it first converts the message (and similarly, since B is in (1, 0), when it receives the server message, it also converts the message received from the server). Since the transforms must be configured so that if xform (c, s) = (c ', s'), then c 'is applied to s equal to s' applied to c, B, and the server falls into the same state. The same thing happens with the message received by the server from B, and then sent to A.

+5
source share

All Articles