[erlang-questions] Reliable message passing / event management questions

Joern opendev@REDACTED
Mon Jul 16 00:08:17 CEST 2007


Dear erlang-questions,

I am currently in the process of modelling an erlang application. This
application concerns itself mainly with message routing - generic
request (and answers to these) are send over a variety of unreliable
carriers.

As the carriers themselves decide wheater they will handle a message
(or not - there are also carrier specific routing rules) the modelling
of the router component as an event manager with persistence handling
and carrier handling as supervised event handlers seemed natural.

In order to guarantee that a generic message would get picked up by
the persistence handler the API sync_notifies the attached event
handlers.

So far, so good. Now I have a bunch of questions / problems with this
approach (obviously I am open for suggestions how to handle things
differently):

 - How am I supposed to embed generic event handlers into a
supervision tree? Implement a behaviour which adds the default
handlers to the manager as part of it's initialization routine?

 - Is there any way for a event handler to signalize that a given
event should not get further processed? I can think of a variety of
workarounds but none seems attractive.

  - Are there any ideas how to handle individual message timeouts?
Monitoring carriers from the carrier handlers and resending the
(current) message if the carrier dies? Periodic polls to the
persistence storage (mnesia)?

  - Is there maybe some hidden way to do this kind of reliable message
transport over non-reliable carriers pattern hidden in the OTP which I
am missing?

Thanks for your consideration,


rgs/joern
--



More information about the erlang-questions mailing list