Hello Elixir Forum!
First, a short introduction. I’m currently going to school, learning software development, and this week we have been able to do whatever we wanted, as long as it was approved by the teacher.
So I took the opportunity to immerse myself in functional programming and specifically Erlang and Elixir.
I have been interested in Elixir for a while and I have played around with IEx a bit, but never had time to really do anything with it, until this week.
There will be a small presentation tomorrow, where I will be showing what I have learned during the week.
For this I have made a small application, that’s supposed to show the easy concurrency that comes with Elixir and Erlang/OTP.
Github Link
The actual application is in the park_mon folder. park_mon_client is a Phoenix web app I quickly hacked together, in order to have something visually showing what is happening.
It’s basically a very simple parking monitoring system, where each monitor GenServer is supposed to represent a parking meter, covering between 5 and 15 parking spots.
The parking meters are grouped in different areas, represented by Supervisors.
I have also made a ‘simulator’ GenServer, so I can show the application in action.
I’m not sure the teacher knows anything of Elixir and Erlang/OTP, so I will probably not be receiving any feedback on the code of the application.
That’s why I’m turning to the forum.
I could use some feedback/criticism, specifically if there are any parts that show a complete lack of understanding about OTP.
Additionally, I’m unsure if the ETS lookup I’m doing in the init function of the monitors, is a prudent way to recover state, after a shutdown?
I had a hard time finding any resources about recovering state, that fit this simple example.
Thanks!