ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP.pm
(Generate patch)

Comparing AnyEvent-MP/MP.pm (file contents):
Revision 1.116 by root, Mon Jun 21 15:09:34 2010 UTC vs.
Revision 1.117 by root, Wed Oct 27 06:32:39 2010 UTC

93 93
94Nodes are either public (have one or more listening ports) or private 94Nodes are either public (have one or more listening ports) or private
95(no listening ports). Private nodes cannot talk to other private nodes 95(no listening ports). Private nodes cannot talk to other private nodes
96currently. 96currently.
97 97
98=item node ID - C<[A-Z_][a-zA-Z0-9_\-.:]*> 98=item node ID - C<[A-Za-z0-9_\-.:]*>
99 99
100A node ID is a string that uniquely identifies the node within a 100A node ID is a string that uniquely identifies the node within a
101network. Depending on the configuration used, node IDs can look like a 101network. Depending on the configuration used, node IDs can look like a
102hostname, a hostname and a port, or a random string. AnyEvent::MP itself 102hostname, a hostname and a port, or a random string. AnyEvent::MP itself
103doesn't interpret node IDs in any way. 103doesn't interpret node IDs in any way.
882 882
883Erlang implements few guarantees on messages delivery - messages can get 883Erlang implements few guarantees on messages delivery - messages can get
884lost without any of the processes realising it (i.e. you send messages a, 884lost without any of the processes realising it (i.e. you send messages a,
885b, and c, and the other side only receives messages a and c). 885b, and c, and the other side only receives messages a and c).
886 886
887AEMP guarantees correct ordering, and the guarantee that after one message 887AEMP guarantees (modulo hardware errors) correct ordering, and the
888is lost, all following ones sent to the same port are lost as well, until 888guarantee that after one message is lost, all following ones sent to the
889monitoring raises an error, so there are no silent "holes" in the message 889same port are lost as well, until monitoring raises an error, so there are
890sequence. 890no silent "holes" in the message sequence.
891 891
892=item * Erlang can send messages to the wrong port, AEMP does not. 892=item * Erlang can send messages to the wrong port, AEMP does not.
893 893
894In Erlang it is quite likely that a node that restarts reuses a process ID 894In Erlang it is quite likely that a node that restarts reuses a process ID
895known to other nodes for a completely different process, causing messages 895known to other nodes for a completely different process, causing messages
953 953
954Strings can easily be printed, easily serialised etc. and need no special 954Strings can easily be printed, easily serialised etc. and need no special
955procedures to be "valid". 955procedures to be "valid".
956 956
957And as a result, a port with just a default receiver consists of a single 957And as a result, a port with just a default receiver consists of a single
958closure stored in a global hash - it can't become much cheaper. 958code reference stored in a global hash - it can't become much cheaper.
959 959
960=item Why favour JSON, why not a real serialising format such as Storable? 960=item Why favour JSON, why not a real serialising format such as Storable?
961 961
962In fact, any AnyEvent::MP node will happily accept Storable as framing 962In fact, any AnyEvent::MP node will happily accept Storable as framing
963format, but currently there is no way to make a node use Storable by 963format, but currently there is no way to make a node use Storable by

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines