Agreed on `supervisor` - that's high up on my list to tick off when the occasion arrives.
On `gen_srv` - while there's room to iterate, I consider the `spawn_srv` / `bind_srv` to be a sufficient analog for me:
https://github.com/leoshimo/vrs?tab=readme-ov-file#services-...
The `gen_server` implementation takes care of things like timeouts, servers terminating before a response is produced as well as maintaining the server state.
You can read more here at [1], [2] and [3].
[1]: https://learnyousomeerlang.com/clients-and-servers#callback-...
You would use them for instance when you need to group behavioral units with a defined interface, even if you don't require any explicit networking.
This is a bit reductive and wrong in some ways but think of gen_server modules and instances as "sort of" like classes/objects. You "send messages/requests" instead of "calling methods," but the spirit is essentially the same -- it's a way of modeling the world with code
Sounds like Smalltalk.
1981 "Design Principles Behind Smalltalk"
https://archive.org/details/byte-magazine-1981-08/page/n298/...