[erlang-questions] pub-sub server implementation detail question.

Dmitry Kolesnikov dmkolesnikov@REDACTED
Tue Mar 5 21:55:49 CET 2013


Yep, this is another headache… 
You have to write a gen_server that acts as "supervisor" for that event_handler...

- Dmitry

On Mar 5, 2013, at 10:37 PM, Tim Watson <watson.timothy@REDACTED> wrote:

> On 5 Mar 2013, at 20:26, Dmitry Kolesnikov wrote:
>> 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.
> 
> Not to mention the fact that if a gen_event handler crashes, it is silently and unceremoniously removed. See add_sup_handler for a way around that old chestnut. :)
> 
> Cheers,
> Tim




More information about the erlang-questions mailing list