Command Pattern via TCP

I’m having trouble with the set_env, as it doesn’t have an update method so I have race conditions (modules are loaded in parallel with on_load executions, it seems; maybe I can find some way to have on_load block the whole loading until it’s done).

So I’m thinking about alternatives. Ets tables etc, would work. But your idea is interesting @al2o3cr - an “attribute map” of the module? I need to try this :smiley:

Essentially I still prefer to keep commands as separate files, and to register them automatically on load; it just seems cleaner (also works for hot code loading I think, as then the module is re-loaded and overwrites its entry in the command map). But your suggestion might fit nicely in my architecture.