Pedro Assunção those are great thoughts, thank you for sharing them! I haven’t done much work yet with Raspberry Pi’s or other hardware devices, but I can definitely see the value in having a GenServer manage a single connection to the hardware.

I completely agree, it’s a phenomenal abstraction. I think like you mentioned, it tends to be the most useful at a lower level like managing WebSocket connections, which is usually where really smart and experienced people go “hey! I could build a generic library for that” and then developers newer to the ecosystem can benefit from rock-solid websocket management without having to be a GenServer pro.

It’s a tough balance, because I think it’s important to learn and understand OTP as you dive deeper into Elixir, but for newer developers I think it tends to be a sticking point that intimidates them, which is unfortunate because you can still write incredible web apps with Elixir using a few libraries and just the very basics of the language.

Written by

Elixir dev building for the web with Phoenix

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store