--- AnyEvent-MP/MP.pm 2009/09/22 09:54:42 1.91 +++ AnyEvent-MP/MP.pm 2009/10/02 14:12:16 1.99 @@ -118,7 +118,7 @@ =item seeds - C Seeds are transport endpoint(s) (usually a hostname/IP address and a -TCP port) of nodes thta should be used as seed nodes. +TCP port) of nodes that should be used as seed nodes. The nodes listening on those endpoints are expected to be long-running, and at least one of those should always be available. When nodes run out @@ -145,7 +145,7 @@ use base "Exporter"; -our $VERSION = $AnyEvent::MP::Kernel::VERSION; +our $VERSION = 1.2; our @EXPORT = qw( NODE $NODE *SELF node_of after @@ -525,7 +525,7 @@ Inter-host-connection timeouts and monitoring depend on the transport used. The only transport currently implemented is TCP, and AnyEvent::MP relies on TCP to detect node-downs (this can take 10-15 minutes on a -non-idle connection, and usually around two hours for idle conenctions). +non-idle connection, and usually around two hours for idle connections). This means that monitoring is good for program errors and cleaning up stuff eventually, but they are no replacement for a timeout when you need @@ -567,7 +567,7 @@ $node->monitor ($port, $cb); defined wantarray - and AnyEvent::Util::guard { $node->unmonitor ($port, $cb) } + and ($cb += 0, AnyEvent::Util::guard { $node->unmonitor ($port, $cb) }) } =item $guard = mon_guard $port, $ref, $ref... @@ -729,8 +729,8 @@ then the callback will be called without any arguments after the time-out elapsed and the port is Ced. -If no time-out is given, then the local port will monitor the remote port -instead, so it eventually gets cleaned-up. +If no time-out is given (or it is C), then the local port will +monitor the remote port instead, so it eventually gets cleaned-up. Currently this function returns the temporary port, but this "feature" might go in future versions unless you can make a convincing case that @@ -776,10 +776,10 @@ programming techniques employed by Erlang apply to AnyEvent::MP. Here is a sample: - http://www.Erlang.se/doc/programming_rules.shtml - http://Erlang.org/doc/getting_started/part_frame.html # chapters 3 and 4 - http://Erlang.org/download/Erlang-book-part1.pdf # chapters 5 and 6 - http://Erlang.org/download/armstrong_thesis_2003.pdf # chapters 4 and 5 + http://www.erlang.se/doc/programming_rules.shtml + http://erlang.org/doc/getting_started/part_frame.html # chapters 3 and 4 + http://erlang.org/download/erlang-book-part1.pdf # chapters 5 and 6 + http://erlang.org/download/armstrong_thesis_2003.pdf # chapters 4 and 5 Despite the similarities, there are also some important differences: @@ -789,7 +789,8 @@ Erlang relies on special naming and DNS to work everywhere in the same way. AEMP relies on each node somehow knowing its own address(es) (e.g. by -configuration or DNS), but will otherwise discover other odes itself. +configuration or DNS), and possibly the addresses of some seed nodes, but +will otherwise discover other nodes (and their IDs) itself. =item * Erlang has a "remote ports are like local ports" philosophy, AEMP uses "local ports are like remote ports". @@ -824,9 +825,9 @@ =item * Erlang suffers from silent message loss, AEMP does not. -Erlang makes few guarantees on messages delivery - messages can get lost -without any of the processes realising it (i.e. you send messages a, b, -and c, and the other side only receives messages a and c). +Erlang implements few guarantees on messages delivery - messages can get +lost without any of the processes realising it (i.e. you send messages a, +b, and c, and the other side only receives messages a and c). AEMP guarantees correct ordering, and the guarantee that after one message is lost, all following ones sent to the same port are lost as well, until