some basic questions
Sat Oct 9 13:13:29 CEST 1999
On Fri, 8 Oct 1999, Vance Shipley wrote:
vances>} there aren't any gurantees for message delivery (no way to know
vances>} if a message was consumed or not)
vances>} -- is there any work being done on this?
vances>This has been one of my concerns I look forward to other's comments.
Well, there is a new monitor() function in OTP R5B, which will also be in
the next Open Source release (of course). It allows a sending process to
monitor the receiving process; if the process is alive before you sent the
message, and keeps on kicking afterwards, it got the message. Now, in R5B,
the monitor() function didn't work across node limits, so one had to rely
on a request-reply dialog protected by a timeout clause. Of course, even
using the monitor() function, you'll probably want a reply message to make
sure that the receiving process go the message -- even for other reasons,
such as (simple) flow control.
To clarify: Erlang does guarantee that the message is delivered *if* the
receiver is alive, and there's a viable path between the sender and
receiver (don't remember if the spec guarantees this, but the current
implementation does, for all practical purposes.)
It is still quite safe to use a cast if you combine this with a recovery
mechanism using query semantics. That is, if the receiver crashes, it will
ask what's been going on when it restarts. After that, it can receive casts
notifying it of new events.
Ulf Wiger, Chief Designer AXD 301 <>
Ericsson Telecom AB tfn: +46 8 719 81 95
Varuvägen 9, Älvsjö mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden fax: +46 8 719 43 44
More information about the erlang-questions