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.
Clone the reposity and inside the root of the repository call
$ go run .
This will execute two example scenarios inside the main
function.
This article was used as a reference for the implementation: https://towardsdatascience.com/understanding-lamport-timestamps-with-pythons-multiprocessing-library-12a6427881c6