[erlang-questions] pub-sub server implementation detail question.
Tue Mar 5 21:26:04 CET 2013
Here is copy-past from documentation.
-- CLIP --
A gen_event manager is the process that registers callbacks. It is very important to understand that all events dispatched by the event manager process to event handlers execute in the context of the event manager process.
-- CLIP --
If you implement PubSub via gen_event then all you subscriber handlers are executed within dispatcher process. This is not good. you would end-up implementing an gen_event handler as a proxy to your subscriber. Why to bother if ten_server can be used directly.
On Mar 5, 2013, at 9:11 PM, Huseyin Yilmaz <> wrote:
> I was checking the source code for kraken (https://github.com/Asana/kraken). I realized that this pub sub server was implemented by using gen_server behavior. But when I think about a pub-sub server, I would definitely choose to use gen_event behavior I think gen_event behavior solves this kind of problems very well. I was wondering if there is a reason for not using gen_event behavior for pub-sub server that I am not aware of?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions