[erlang-questions] clarify: order of messages

Matej Kosik <>
Sun Nov 18 21:22:50 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

KatolaZ wrote:
> On Sun, Nov 18, 2007 at 10:55:35AM -0800, Zvi wrote:
>> Same processes on the same node?
>> Will be this a case when processes are on different nodes?
>>
> 
> If the same process (only one) sends two messages one after the other
> (Msg1 and Ms2, respectively) to another process, then those two
> messages are going to be received in the same order as they have been
> sent, i.e. Msg1 first and then Msg2. And this does not depend on the
> fact that the two processes are running on different nodes (since I'm
> quite sure that message passing among remote nodes is handled using
> TCP sockets, so the *order* of transmission should be preserved...)
> 
> Or, at least, I hope it works so ;-)

I hope (but I am not sure) so too. My problems arise from the fact that I did not studied internals
of Erlang VM (or I did not studied Erlang formal semantis---I am not sure if there is something like
that).

In a system I am in charge to write I have observed an anomaly. In this case, there were at least
three processes.
- - server S
- - client C1
- - client C2

The client C1 sends messages to server S "intensively". The client C2 sends messages to server S
occassionally. It is desirable that messages from C2 will be handled (in a finite time). But I have
observed the opossite situation. As if the virtual machine did not guaranteed the fairness. Only
messages from C1 were received by S. Is something like that possible?

(to avoid this situation, I had to decrease the intensity by which client C1 sends messages to
server S. Weird.).

> 
> HND
> 
> Enzo
> 


- --
Matej Kosik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQJ8aL+CaXfJI/hgRAuxdAJ9NBs/jCJDcrPB6pW6DEX+l7LUOQgCgg7u8
NAsPd9pNZ6OWMvCw9kufOjo=
=Zuq+
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list