This project is an implementation of the Game of life done by Gabriele Lana and me during the last months.
We took it as a "toy project" to explore all the nontrivial decisions that need to be made when you have to program a distributed system (eg: choose the right supervision strategy, how to make sub-systems communicate each other, how to store data to make it fault tolerant, ecc...).
It is inspired by the Torben Hoffman's version and on the talk Thinking like an Erlanger.
The project is still under development, at the moment we are doing a huge refacroting of the codebase because we are reorganizing the supervision strategy.
There is nice interface (developed with wxWidgets) to visually test the project:
It is possible to start a demonstration with:
Note that the first parameter of demo:start/2
is the dimension of the universe and the second parameter is a list of cells alive at the time 0.
demo:start(30, [{15, 15},{14,15},{16,15}]).
Clicking on "tick" makes the univese time advance by one tick while clicking on "start" makes the univese time ticking at a constant rate (until "stop" is clicked).
Killing cells is really easy, it only requires a double click on the condemned cell. The cell will chage its color to red until it will have recovered and will not be at par with the other cells.
When it happens everything will go on normally.
To compile code:
./rebar3 compile
To run tests:
./rebar3 eunit
To start a shell and try to play:
./rebar3 shell