Changes between Version 3 and Version 4 of Infinote/Protocol

Show
Ignore:
Timestamp:
09/25/07 20:10:29 (6 years ago)
Author:
armin (IP: 87.178.215.178)
Comment:

Explained state Vector Diffs

Legend:

Unmodified
Added
Removed
Modified
  • Infinote/Protocol

    v3 v4  
    33Please note: This document is by no means complete. Comments appreciated. 
    44 
    5 TODO: Formatting... 
     5TODO: Session example(s) 
    66 
    77TODO: List error domains and codes 
     
    3030 * Synchronization-Only: A session can be synchronized to a client without the client subscribing to the session. 
    3131 * No-User-Subscription: A host can subscribe to the session without joining a user (and therefore unable to modify the document). This is read-only access, in fact. 
    32  * Multiple-User-Subscription: When subscribed, a host can join multiple users into the session. This allows a client to act as a proxy for more clients that can connect to the proxy but not to the "real" server. 
     32 * Multiple-User-Subscription: When subscribed, a host can join multiple users into the session. This allows a client to act as a proxy for more clients that only can connect to the proxy but not to the "real" server. 
    3333 
    3434== XMPP == 
     
    431431The state of a document is completely defined by a so-called state vector specifying how many operations each user did. For example, if user A made 2 requests and user B made 3 requests, the document has a certain state. All users that processed these 5 requests are in the same state. Note that it does not matter in which order the requests are processed (as long as the causal order is kept), which is the key concept behind the adOPTed algorithm. 
    432432 
    433 Each user maintains a state vector for each user that describes in which state that user is. This vector is updated every time a request is received from a particular user. This requires every user to send no-op requests if it has been inactive for some time, so that others know the state of this user. 
     433Each user maintains a state vector for each other user that describes in which state that user is. This vector is updated every time a request is received from a particular user. This requires every user to send no-op requests if it has been inactive for some time, so that others still know the state of this user. 
    434434 
    435435Also, each user maintains a request log in which all requests the user made are stored. This is required for transforming incoming requests from other users that were made in a different state of the document. Details to the adOPTed algorithm and how these transformations are performed can be found in the papers at http://portal.acm.org/citation.cfm?id=240305 and http://portal.acm.org/citation.cfm?doid=320297.320312. 
     
    452452 
    453453{{{ 
    454 <sync-state time="time" /> 
    455 }}} 
    456  
    457  * time, StateVector: The current state vector. 
    458  
    459 Tells the state vector of the state the document currently is in. 
    460  
    461 {{{ 
    462454<sync-request user="user_id" time="time"> 
    463455 <operation /> 
     
    491483 
    492484 * user, Integer: The ID of the user that made the request. 
    493  * time, State Vector: The document state at which the request was made. 
     485 * time, State Vector diff: Describes the document state at which the request was made. 
    494486 * operation: The operation performed by the request, see below. 
    495487 
    496 Whenever a user issues a request the <request> message is sent. The user must have joined via the connection the request message comes from. <request> is sent to the whole subscription group. 
     488Whenever a user issues a request the <request> message is sent. The user must have joined via the connection the request message comes from. <request> is sent to the whole subscription group. The time sent with this message is not absolute, but relative to the time from the last request of this user. For, example, if time contains the value "2:3;1:1", this means that since the last request of that user, it processed 3 requests from user 2 and one request from user 1. Note that the  value for the user itself is therefore always zero, because there cannot be any requests inbetween them. This requires the requests from some user to arrive in-order, but it state vector components from inactive (or users that have left the session) need not to be transmitted all the time. 
    497489 
    498490=== Operations === 
     
    500492There are two types of operations. Such operations that modify the document and such that do not. For example, inserting a character into the document does modify it, but moving the cursor of a user does not. If the operation of a request does not modify the document, the request is not recorded in the request log. 
    501493 
    502 The following operations are defined 
     494The following operations are defined: 
    503495 
    504496{{{