Skip to content

Instantly share code, notes, and snippets.

@tommedema
Created October 29, 2012 12:20
Show Gist options
  • Save tommedema/3973231 to your computer and use it in GitHub Desktop.
Save tommedema/3973231 to your computer and use it in GitHub Desktop.
T0 Server 1 sends "task.admincreation", rolls 5
T4 S2 receives from S1
T5 S3 receives from S1
T0 Server 2 sends "task.admincreation", rolls 50
T6 S1 receives from S2 roll 50
T3 S3 receives from S2
T0 Server 3 sends "task.admincreation", rolls 30
T2 S1 receives from S3
T1 S2 receives from S3
Time:
0: S1 sends "coordinate.admincreation" with roll 5
0: S2 sends "coordinate.admincreation" with roll 50
0: S3 sends "coordinate.admincreation" with roll 30
1: S2 receives from S3 roll 30 --> DENY S3, ACCEPT S2, WAIT S1.
2: S1 receives from S3 roll 30 --> ACCEPT S3, DENY S1, WAIT S2.
3: S3 receives from S2 roll 50 --> ACCEPT S2, DENY S3, WAIT S1.
4: S2 receives from S1 roll 5 --> DENY S3, ACCEPT S2, DENY S1.
5: S3 receives from S1 roll 5 --> ACCEPT S2, DENY S3, DENY S1.
6: S1 receives from S2 roll 50 --> DENY S3, ACCEPT S2, DENY S1.
--> SERVER TWO HAS BEEN ACCEPTED
--> REQUIREMENT: each server (and process) must know all other servers (and processes) and wait for their message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment