[erlang-questions] OTP application design

Kirill Zaborski qrilka@REDACTED
Tue Jun 12 12:05:47 CEST 2007

I'm trying to design some application but not sure how to do it properly in
terms of OTP design principles. What I'm trying to implement right now is a
configuration of a central "dispatcher" app and "worker" apps which will be
added and deleted dynamically (they will reside on hosts remote to the
dispatcher). Both types of applications are gen_server instances. With
dispatcher I can call its public API e.g. dispatcher:request(Data), which
will be  then translated to gen_server:call(?MODULE, {request, Data}). And
then I need to pass this request to worker applications based on some rules.
But I do not understand what should I do with worker apps, how should I call
They register themself in dispatcher with dispatcher:connect(self()). But
then in dispatcher process I have their worker process Pid and so I can not
use gen_server API. Is there some way around this?

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070612/918080f8/attachment.htm>

More information about the erlang-questions mailing list