Herdsim, a Distributed Systems Simulator written in Pony

herdsim is a distributed systems simulator written in Pony. It is a rewrite of dssim, a simulator I wrote several years ago in C. It allows the user to define the network topology, the nodes, and the behavior of the nodes as Pony code.

I was looking forward to learning Pony and I thought that this simulator would be a good project to start with. I guess I learned about 30% of the language while writing the simulator, so I’m still a beginner, be patient with my mistakes. Nevertheless, I am happy with the result and I enjoyed writing it. Pony is a very interesting language, with a lot of impressing features.

Currently, the master branch is the first working version of the simulator. It contains the basic functionalities to define the network topology, the nodes, and the behavior of the nodes. It also contains several examples. Check the project readme for more information and how to use it.

Other branches contain some experiments and improvements that I am working on. In particular:

  • protocol-composer : A small programming language to define the behavior of the nodes. It is a simple language that allows the user to define the behavior of the nodes in a more structured way. The language is compiled to Pony code and then compiled together with the simulator. The language is still in an experimental phase and it is not yet integrated with the simulator.

  • multiprotocol-support : Support for multiple protocols in the same simulation. The agents can execute different protocols in sequence.

  • robots-support : Support for robots that explore the network, collect information, and execute actions.

All the suggestions and improvements are welcome.