proxy? behaviour pattern implementation
Tue Sep 27 19:08:19 CEST 2005
On 23/09/05, Gaspar Chilingarov <nm@REDACTED> wrote:
> hi there!
> I have some problems with properly implementing
> proxy pattern - i.e. I have one process which can emit messages to
> another process, and I wish to have another running process to
> retranslate them to subscribed processes.
> So I need to implement process which can handle registering/
> unregistering subscribers, and broadcasting messages got from another
> This can be implemented without any problems, but how should I handle
> crashes and restarts of receiving processes?
You can monitor the receiving processes. Checkout erlang:monitor/1
> And how emitting process
> should know and handle restarts of proxy process -- I mean how it should
> get new pid after restart?
Register a name for your proxy and you can always refer to it by name.
More information about the erlang-questions