[erlang-questions] EUC 2006 / proposal to enhance message receive

Jay Nelson <>
Thu Nov 9 08:29:55 CET 2006


I collaborated with Ulf on a presentation entitled "Message Receive 
Fundamentals".  I was looking forward to attending the conference with 
its strong agenda this year, alas it was not to be.  Due to time 
constraints, the presentation will be part of the program but will not 
be presented.

The briefing is online at http://www.duomark.com/erlang/ under the 
Erlang Tutorials section.  It is in HTML rather than PDF or PPT.  The 
main line of the presentation is just 4 slides, but the overview slide 
has links to subsections that are loops which return to the overview.  
It covers the basic syntax of the receive statement, some 
recommendations on usage and then some examples of beginning to 
intermediate problems.

The genesis of the presentation was an issue that cropped up when I was 
doing the "Concurrent Caching" paper.  I wanted write thru to take 
precedence over any pending read of the cache.  As shown in the 
Fundamentals briefing, the problem of having a high priority message 
requires 4 processes and the ACKing of all messages if you want to avoid 
N! + N performance (where N is the number of messages on the queue).  
This result seemed counterintuitive to me.  Erlang makes message sending 
and receiving trivial, yet the single sequential queue made it extremely 
difficult to efficiently handle some messages before others.

As a result of the briefing I added a suggested language change to 
introduce a control message queue which is separate from the existing 
data message queue.  A quick summary of the proposal is given in the 
last slide of the presentation.  A detailed description is given at 
http://www.duomark.com/erlang/proposals/outofband.html (a link is 
available on the general erlang page under "Proposals for Erlang 
Enhancements").

Please provide any feedback you think relevant to the problem.

jay




More information about the erlang-questions mailing list