Original Post
Assume that you have two computers connected to eachother. Let's call them Alice and Bob ;) Now they both have a variable called Data. Alice wants to change its Data to some value, but Alice is not allowed to change it until Bob's been notified about the change and Bob may not change it's value unless Alice does as well. In other words neither Bob or Alice may change their Data value without beeing sure that the other does so as well. They must both either change the Data to the same value or both reject the change. How do you go about writing something like that? It seems simple at first but it's quite hard, especially when you consider that the connection between the computers make break down at any point. Some flawed ways of changing Data to 42 (assuming both Data to default to zero): Alice sets Data=42 and sends the message "Data=42" to Bob. Bob sets Data=42 when message is received. This fails if the message doesn't reach Bob, then Alice.Data=42 and Bob.Data=0. Alice sends the message "Data=42" to Bob. Bob sets Data=42 then sends the message "Change ok" to Alice. Alice sets Data=42 when the message is received. This fails if the last message doesn't reach Alice, then Alice.Data=0 and Bob.Data=42 Are there any common/known ways of achieving the above? It is ok to introduce a third party. Is this impossible? Come on gurus! :)