https://github.com/kuredoro/vclock_sim
Vector clock algorithm simulation via gouroutines and channels.
https://github.com/kuredoro/vclock_sim
distributed-systems educational small toy-project vector-clocks
Last synced: about 1 year ago
JSON representation
Vector clock algorithm simulation via gouroutines and channels.
- Host: GitHub
- URL: https://github.com/kuredoro/vclock_sim
- Owner: kuredoro
- License: bsd-3-clause
- Created: 2020-09-29T03:27:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-01T08:56:55.000Z (over 4 years ago)
- Last Synced: 2025-03-17T21:17:46.014Z (about 1 year ago)
- Topics: distributed-systems, educational, small, toy-project, vector-clocks
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vector Clock Simulator
This small project is a simulator of a toy distributed system that employs the vector clock timestamps to order events.
It implements a `ProcessPool` struct that provides straightforward API for defining a scenario for interactions between these processes.
The processes themselves, for simplicity of implementation, are not OS-level processes, but rather GO routines that communicate via Go's built-in channels instead of pipes.
## How to run
Clone the reposity and inside the root of the repository call
```
$ go run .
```
This will execute two example scenarios inside the `main` function.
## Reference
This article was used as a reference for the implementation: https://towardsdatascience.com/understanding-lamport-timestamps-with-pythons-multiprocessing-library-12a6427881c6