[erlang-questions] Delivery of messages

Joe Armstrong erlang@REDACTED
Thu Feb 23 19:28:58 CET 2012

Tricky question.

What about time and if the system is very very very slow?

Assume nothing is observed to be broken - you'd have to ask "with no
observations that indicate failure can we assume messages are delivered
within some time T" - but Erlang has no notion of delivering a message
with time T.

The Erlang programming model assumes that in the absence of evidence to
the contrary then messages between a single pair of processes will be
delivered in the order they were transmitted. The underlying
infrastructure is supposed to guantee this - but it would be
impossibly to prove this correct.

Also the destination process must always be available to receive a message
but even if the destination process has not crashed there might be a logic
error in the code so that it would never receive the message (again
which could not be proved)

I use a weaker condition - it you want to be sure that a process
received a message then send a reply back, once you have received the
reply you know
the message was received. You don't have to do this for every message
but whenever you feel appropriate.


On Thu, Feb 23, 2012 at 6:49 PM, P.H.Welch <P.H.Welch@REDACTED> wrote:
> Hello - I'm new to Erlang but have been working on concurrency stuff
> for 27 years plus.  I'm afraid I want to ask a question asked many
> times before, but under specific conditions that I've not seen nailed
> down.  It's about the guaranteed delivery of messages.
> The most authoritative discussion I've found is question 10.10 at:
>  http://www.erlang.org/faq/academic.html
> The answer quotes Per Hedeland:
>  "Delivery is guaranteed if nothing breaks ..."
> which would have been enough but for the following discussion!  This
> continues with:
>  "It seems this issue of "guaranteed delivery" comes up every now
>   and then, but I've never managed to find out exactly what it is
>   those that are asking for it actually want ..."
> Three possible wants are then itemised, none of which are mine.  My
> conditions are:
>  If process P sends a message to process Q and:
>    * neither process crashes;
>    * Q commits to receive P's message;
>    * the cores/processors/computers on which P and Q are running
>      do not crash or get turned off;
>    * no part of the communication fabric delivering the message
>      crashes or gets turned off;
>  is Q guaranteed to receive the message?                       (1)
> I want to be sure that, under these conditions (in which nothing is
> breaking), no message is ever lost in the system between P and Q.
> A message *might* be lost by a non-crashing communication fabric
> (e.g. if a buffer somewhere became full and, for memory or time
> reasons, it was thought best to discard some traffic silently) or
> by a non-crashing Erlang run-time system (same reason).
> Do we have a guarantee that this (or something similar) does not
> happen?
> Is the answer to question (1) ... "Yes"?
> Thanks,
> Peter Welch.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list