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.56 by root, Sat Aug 15 04:12:38 2009 UTC vs.
Revision 1.57 by root, Sat Aug 15 04:34:34 2009 UTC

681 "$noderef#$id" 681 "$noderef#$id"
682} 682}
683 683
684=back 684=back
685 685
686=head1 NODE MESSAGES
687
688Nodes understand the following messages sent to them. Many of them take
689arguments called C<@reply>, which will simply be used to compose a reply
690message - C<$reply[0]> is the port to reply to, C<$reply[1]> the type and
691the remaining arguments are simply the message data.
692
693While other messages exist, they are not public and subject to change.
694
695=over 4
696
697=cut
698
699=item lookup => $name, @reply
700
701Replies with the port ID of the specified well-known port, or C<undef>.
702
703=item devnull => ...
704
705Generic data sink/CPU heat conversion.
706
707=item relay => $port, @msg
708
709Simply forwards the message to the given port.
710
711=item eval => $string[ @reply]
712
713Evaluates the given string. If C<@reply> is given, then a message of the
714form C<@reply, $@, @evalres> is sent.
715
716Example: crash another node.
717
718 snd $othernode, eval => "exit";
719
720=item time => @reply
721
722Replies the the current node time to C<@reply>.
723
724Example: tell the current node to send the current time to C<$myport> in a
725C<timereply> message.
726
727 snd $NODE, time => $myport, timereply => 1, 2;
728 # => snd $myport, timereply => 1, 2, <time>
729
730=back
731
732=head1 AnyEvent::MP vs. Distributed Erlang 686=head1 AnyEvent::MP vs. Distributed Erlang
733 687
734AnyEvent::MP got lots of its ideas from distributed Erlang (Erlang node 688AnyEvent::MP got lots of its ideas from distributed Erlang (Erlang node
735== aemp node, Erlang process == aemp port), so many of the documents and 689== aemp node, Erlang process == aemp port), so many of the documents and
736programming techniques employed by Erlang apply to AnyEvent::MP. Here is a 690programming techniques employed by Erlang apply to AnyEvent::MP. Here is a

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines