Changes Current users: guest (web) |
The vector clock mechanism needs to be able to generate an array of integer timestamps, one per client, which can be compared to see if two messages generated by different clients have a defined order or were concurrent. These timestamp arrays need to have the same relative order on all clients, which presents a problem for a replicated system like CORK. Our current (020725) scheme, there is significant opportunity for a race condition. When the document listener detects an attempt to edit the document locally:
Having the clients determine their own indexes in problematic, since two could claim the same index fairly easily. Possible solutions to this include:
Option (2) is likely to be significantly more efficient than option (1), but the timing of the AddParticipant operation is still a little tricky:
NOTE: This type of Change behavior (where behavior changes based on server-side vs client-side execution) may be problematic if/when we move to a federated server scheme, unless changes are first sent to the master server and then re-distributed on reply. The current scheme of simply saving a flag indicating that the change has been applied once may need to be replaced with a more general mechanism that provides details about the context in which the change is being applied. (e.g., remote client, originating client, cache server, master server) Changes introduced in October 2002 take avantage of the fact that (in the current shared editor implementation) we never need to generate a fully ordered list of events. The cork.util.VectorClock maintains parallel lists of client ids and counters, along with methods for looking up the counter for a given id. Clients send an AddParticipant message on the first edit, which also includes a list of dead paraticipants. |
| /public/projects/bridge/design/Vector clock management | Login | Web Editor | Full Editor |
| Last modified 9/11/03 1:58 PM by isenhour (history) Site contents | |