[erlang-questions] Message Ordering and Reliability in Erlang

Fuad Tabba fuad@REDACTED
Fri Jun 27 07:49:32 CEST 2008


Thanks Matt,

I feel a bit silly now for not having read the FAQ :) relying on google a
bit too much...


On Fri, Jun 27, 2008 at 5:44 PM, Matthias Lang <matthias@REDACTED>
wrote:

> On Fri, Jun 27, 2008 at 11:47:58AM +1200, Fuad Tabba wrote:
> > I was wondering, when sending messages in Erlang, is ordering preserved?
> > i.e. Process A sends 1 then 2 to B; can I count on B receiving 1 before
> > receiving 2 (not talking about selective receive).
>
> From the FAQ:
>
> 10.9 Is the order of message reception guaranteed?
>
> Yes, but only within one process.
>
> If there is a live process and you send it message A and then message
> B, it's guaranteed that if message B arrived, message A arrived before
> it.
>
> On the other hand, imagine processes P, Q and R. P sends message A to
> Q, and then message B to R. There is no guarantee that A arrives
> before B. (Distributed Erlang would have a pretty tough time if this
> was required!)
>
> > What about reliability? Assuming that there aren't faulty processes or
> > broken links (slow is ok), is it possible for some messages to be dropped
> by
> > others not? To use the same example, A send 1 then 2, is it possible for
> B
> > to only receive 2?
>
> Covered in the next question in the FAQ. Start reading here:
>
>  http://www.erlang.org/faq/academic.html#10.9
>
> Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080627/99ec1360/attachment.htm>


More information about the erlang-questions mailing list