/ in English

Erlang Shell Visualization demo

Этот пост есть на русском языке: http://vladimir-vg.me/erlangh-shiell-s-vizualizatsiiei/

Once I have spent half of my work day desperately trying to find an error in code. I was staring at logs, trying to fit them to the code. I tried to imagine what actually went wrong and what scenario had occurred. After adding a lot of debug output into the code, I finally identified the problem.

I felt annoyed because the error was stupid and obvious. If I had some kind of map before my eyes, where I could see the lifetime of erlang-processes and their communication, I could find the error in 5 minutes instead of several hours. I wouldn't be forced to blindly stare into the walls of the log text.

I've thought considerably about program visualization before (in Russian). Now I want to have some kind of map of erlang processes and their events, all of which are aligned on a single timeline.

I decided to create a demo-project, visualizing processes spawned from a shell and their communication. For every opened shell, an erlang node is started without any isolation or security. The collected events are written into csv file.

Here you may find the code of this project: https://github.com/vladimir-vg/espace/tree/demo-07-2017

Here you can examine several pre-recorded shell scenarios (without connection to erlang node): http://vladimir-vg.github.io/espace-demo-07-2017/

For example here are some scenarios from book 'Learn you some Erlang':

Оr here — the example from Hexlet 'Practical Erlang':

To experiment with real erlang you may run docker image on your machine using this command:

docker run -i -t -p 8099:8099 vladimirvg/espace:demo-07-2017

Once started, open http://localhost:8099