[erlang-questions] Message multiplexing

Sean Hinde <>
Sat Jul 28 11:21:08 CEST 2007


The answer is that you will have to wait until all of message A has  
been delivered. This is required because erlang DOES make ordering  
assurances for message sending from the same process.

This issue is a problem is when you are sending a large message from  
one process and small messages from other processes. One solution  
would be for the distribution protocol to multiplex in chunks of X  
bytes rather than whole messages (while retaining the order of  
messages on a per process basis) , and then re-assemble the messages  
at the other end before delivery.

Some work to do at a quite low level to make this happen.

Sean

On 28 Jul 2007, at 01:35, Ryan Rawson wrote:

> Sounds like the real question is, does the distribution protocol use 1
> or more tcp sockets?  Perhaps netstat and an experiment can answer
> this question? I'm also curious.
>
> -ryan
>
> Sent from my iPhone
>
> On Jul 27, 2007, at 3:59 PM, "Jim McCoy" <> wrote:
>
>> Can anyone out there save me from diving into the Erlang source to
>> determine whether or not Erlang does any multiplexing of messages
>> being sent between processes (esp. processes on different nodes)?   
>> The
>> fact that there are no ordering assurances for message sending gives
>> me a bit of hope, but I would love to know any low-level details that
>> would answer this question.
>>
>> The basic case I am thinking of is sending messages A, B, and C from
>> node 1 to node 2.  Message A is 10M and messages B and C are 10  
>> bytes.
>> Assuming the messages are all sent from the same process in the order
>> node2 ! A, node2 ! B, node2 ! C, is there any hope that messages B  
>> and
>> C might not have to wait around for all 10M of message A to get
>> delivered to node 2 before they hop on to the wire?
>>
>> Regards,
>>
>> Jim
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list