This is a naive (see for yourself!) implementation that explores the idea of simulating a ring of N
actors that send the messages to each over M
times.
Concept of the ring benchmark and simulated actors is taken from the gist by Preetam Jinka: https://gist.github.com/Preetam/98e80cd17ecb8748c72b
Given N=1000
and M=1000
, the result on my machine is:
/usr/local/share/dotnet/dotnet /Users/rinat/proj/core/SimRing/bin/Release/netcoreapp2.0/SimRing.dll
00:00:00.0260680
This naive implementation is a start for building up a deterministic simulation of a cluster in a world full of failures. Another building block is the time simulation: https://github.com/abdullin/simcpu
- How would you implement a ring benchmark in golang?
- This .NET Core implementation is way faster than Erlang. What does Erlang spend time on?
- Why is this implementation faster than FoundationDB Flow? What extra work could the Flow do?
Next, we'll plug into .NET Core async/await to simulate processes running in parallel. Check it out.