GUESSTIMATE

Kaushik Rajan, Sriram Rajamani, Shashank Yaduvanshi
2010 SIGPLAN notices  
We present a new programming model GUESSTIMATE for developing collaborative distributed systems. The model allows atomic, isolated operations that transform a system from consistent state to consistent state, and provides a shared transactional store for a collection of such operations executed by various machines in a distributed system. In addition to "commited state" which is identical in all machines in the distributed system, GUESSTIMATE allows each machine to have a replicated local copy
more » ... f the state (called "guesstimated state") so that operations on shared state can be executed locally without any blocking, while also guaranteeing that eventually all machines agree on the sequences of operations executed. Thus, each operation is executed multiple times, once at the time of issue when it updates the guesstimated state of the issuing machine, once when the operation is committed (atomically) to the committed state of all machines, and several times in between as the guesstimated state converges toward the committed state. While we expect the results of these executions of the operation to be identical most of the time in the class of applications we study, it is possible for an operation to succeed the first time when it is executed on the guesstimated state, and fail when it is committed. GUESSTIMATE provides facilities that allow the programmer to deal with this potential discrepancy. This paper presents our programming model, its operational semantics, its realization as an API in C#, and our experience building collaborative distributed applications with this model. class Sudoku : GSharedObject { 2 private int[9,9] puzzle; 3 ... 4 private bool Check(int row, int col, int val) 5 { 6 //returns true if adding val at puzzle[row,col] 7 //does not violate the constraints of Sudoku 8 // and false otherwise 9 ... 10 } 11 12 public bool Update(int r, int c, int v) 13 { 14 //adds value to puzzle[r,c] if all constraints 15 // are satisfied 16 if (r > 9 || r <= 0) return false; 17 if (c > 9 || c <= 0) return false; 18 if (v > 9 || v <= 0) return false; 19 if (!Check(r, c, v)) 20 return false; 21 puzzle[r, c] = v; 22
doi:10.1145/1809028.1806621 fatcat:4xnfal4rafgari4jndniy5udxe