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

Richard Andrews <>
Mon Jul 16 06:05:12 CEST 2007


--- Joern <> wrote:

> 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.

OK I think I have a handle on this. So I restate what I think is the task:

You are using a set of parallel comms channels to move a message from point A
to point B. You don't care which route it takes provided it gets there by one
of them, and when delivery is confirmed all the other channels can give up.


It seems to me that one model would be as follows:

For each message which is to be transported spawn an event transporter process,
which in turn spawns a set of carrier processes (for each parallel comms
channel), each carrier has the task of moving the same single message to the
other end.

Each carrier process exits after a timeout.

The first carrier to report that the message was successfully delivered signals
this to the transporter which then kills off all the children and reports up
the tree that the message has been delivered.

If all of the carriers are unsuccessful, then the transport process signals
failure up the tree as it exits.

--
  Rich



      ____________________________________________________________________________________ Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts.
http://au.docs.yahoo.com/mail/unlimitedstorage.html






More information about the erlang-questions mailing list