Skip to content

Commit 5850f0f

Browse files
committed
update README
Signed-off-by: Utkarsh Srivastava <[email protected]>
1 parent 71a917b commit 5850f0f

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,31 @@
33
go-vsr is the implementation of ViewStamped Replication[^1] in Golang. The goal here is to NOT build a production ready package rather is to simply play around with the protocol. As of now the it implements:
44
1. Normal Operation
55
2. View Change
6+
3. State Transfer
67

78
Recovery is not yet supported.
89

910
[^1]: https://pmg.csail.mit.edu/papers/vr-revisited.pdf
1011

11-
There is a simulator in the repository but it is NOT functional at the moment. There are many reasons for that, primarily that there are still quite a few sources of non-determinism in the code (probably biggest is the networking layer).
12+
## Simulator
13+
The simulator in the repository is still in works as is the VSR implmentation. The simulator is a deterministic simulator, i.e. for as long as the given seed is the same, you should be able to generate the same scenarios on repeat. At the moment, the simulator is in working condition and can do the following:
14+
1. Take a seed and create a cluster of random numbers of replicas + random number of clients.
15+
2. Simulates packet drops
16+
3. Simulates unordered deliveries
17+
4. Simulates network delays
18+
5. Can do some sanity tests in the middle of the simulation as simulator drives the entire cluster and clients as well as has complete control over the passage of time.
19+
6. Performs a several assertions at the end of the simulation.
20+
21+
### How to run?
22+
Running the simulator is easy, you just need Go installed on the system.
23+
```console
24+
$ go run ./cmd/simulator <seed>
25+
```
26+
27+
If a seed is given then that seed will be used or else a seed will be generated and will be printed.
28+
29+
## Example
30+
There is a simple client (REPL) server example in the repository. It can mimic a distributed in-memory KV store.
1231

1332
### How to run the example?
1433
```console
@@ -41,5 +60,5 @@ client=>
4160

4261
The above will start a client which can communicate with the cluster.
4362

44-
### NOTE
63+
## NOTE
4564
This is below alpha level software at the moment and is being actively worked on.

0 commit comments

Comments
 (0)