From b9d8fb4e04e9dc617053e6b095a64a99b61894cf Mon Sep 17 00:00:00 2001 From: keleher <keleher@cs.umd.edu> Date: Tue, 3 Dec 2019 18:25:00 -0500 Subject: [PATCH] auto --- README.md | 77 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 9123b4b..2a8fa44 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,9 @@ log abstraction in `replica.go` ## Use of the `transactionalClient` `transactionalClient.go` differs from `client.go` in that it reads commands interactively. Once started, it reads commands (arbitrary strings) from STDIN -and sends them to replica 0. The sole exception is: +and sends them to replica 0. The sole exceptions are: - `pause <n>` is interpreted as a command to pause for `n` seconds. +- an empty string (just carriage return) is ignored. All other strings are sent to the replica. At end-of-text (CTRL-D), `transactionalClient` prints the contents of the K/V @@ -129,51 +130,59 @@ two things: ### Strict Serializability One example. Time is going downwards. Note that transaction *1* of client *1* is different from transaction *1* of client *2*. You can type these in interactively. +``` +1,1,w,A,0 +1,1,w,B,0 +1,1,commit + +1,2,r,A +1,2,w,B,nice + +2,1,r,A +2,1,w,B,foo + +2,2,w,A,bar +2,2,r,B +2,2,commit + +2,1,commit + +1,2,commit +``` - R1 R2 - 1,1,w,A,0 - 1,1,w,B,0 - 1,1,commit - 1,2,r,A - 1,2,w,B,nice - 2,1,r,A - 2,1,w,B,foo - 2,2,w,A,bar - 2,2,r,B - 2,2,commit - 2,1,commit - 1,2,commit - If one of the clients was invoked with option `-p`, it should print: ``` trans 1.1 commit trans 2.2 commit trans 2.1 abort trans 1.2 abort -A='bar' -B='0' +A="bar" +B="0" ``` --- And another: +``` +1,1,w,A,0 +1,1,w,B,0 +1,1,commit + +1,2,w,A,1 +1,2,r,B + +2,1,w,B,1 +2,1,r,A +2,1,commit + +1,2,commit +``` - R1 R2 - 1,1,w,A,0 - 1,1,w,B,0 - 1,1,commit - 1,2,w,A,1 - 1,1,r,B - 2,1,w,B,1 - 2,1,r,A - 2,1,commit - 1,2,commit - Your client w/ `-p` should print: ``` trans 1.1 commit trans 2.1 commit trans 1.2 abort -A='0' -B='1' +A="0" +B="1" ``` @@ -185,16 +194,16 @@ trans 1.1 commit trans 2.2 commit trans 2.1 commit trans 1.2 abort -A='bar' -B='foo' +A="bar" +B="foo" ``` and ``` trans 1.1 commit trans 2.1 commit trans 1.2 abort -A='1' -B='1' +A="1" +B="1" ``` ## Submitting -- GitLab