I can start my event framework just fine when I register it locally:
gen_event:start_link({local, foo_event_container}).
gen_event:add_handler(foo_event_container, foo_event_handler, []).
Calling registered() shows foo_event_container, and when I send messages to it, they show up in the handler.
However, when I restart the node and try
gen_event:start_link({global, foo_event_container}).
registered() does NOT show the container, and when I try to add a handler to it I get
** exception exit: noproc
in function gen:call/4
in call from gen_event:rpc/2
Sasl doesn't provide any additional info, and googling this issue produces a guess that the shell running the container has been killed, which is not the case here since I'm trying to access it from the same node!
1) Any ideas what's going on here?
2) Is having a remote container the best design, or would it be better to have each server use local containers that all send out messages to a remote process?
Thanks!