Having a running prototype, I now try to challenge my choices and refactor my project.
I’m currently using several ETS tables that I keep track of in a Map used as index. This index is passed in the state data of my GenServer.
When I need to use one of this store, I get it from my index but I’ve also noticed that they could also directly be accessed by the atom value of the ETS table. Coming from C / C++ this looks like a global variable to me that’s why I’ve chosen the Map approach (remember ? globals are baaaad).
Anyway, maybe I tend to over complicate the problem, what design do you usually apply ?