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

Comparing AnyEvent-MP/MP/Intro.pod (file contents):
Revision 1.58 by root, Fri Mar 23 21:16:25 2012 UTC vs.
Revision 1.59 by root, Sat Mar 24 00:48:53 2012 UTC

1=head1 Message Passing for the Non-Blocked Mind 1=head1 Message Passing for the Non-Blocked Mind
2 2
3=head1 Introduction and Terminology 3=head1 Introduction and Terminology
4 4
5This is a tutorial about how to get the swing of the new L<AnyEvent::MP> 5This is a tutorial about how to get the swing of the L<AnyEvent::MP>
6module, which allows programs to transparently pass messages within the 6module family, which allows processes to transparently pass messages to
7process and to other processes on the same or a different host. 7itself and to other processes on the same or a different host.
8 8
9What kind of messages? Basically a message here means a list of Perl 9What kind of messages? Basically a message here means a list of Perl
10strings, numbers, hashes and arrays, anything that can be expressed as a 10strings, numbers, hashes and arrays, anything that can be expressed as a
11L<JSON> text (as JSON is the default serialiser in the protocol). Here are 11L<JSON> text (as JSON is the default serialiser in the protocol). Here are
12two examples: 12two examples:
17When using L<AnyEvent::MP> it is customary to use a descriptive string as 17When using L<AnyEvent::MP> it is customary to use a descriptive string as
18first element of a message that indicates the type of the message. This 18first element of a message that indicates the type of the message. This
19element is called a I<tag> in L<AnyEvent::MP>, as some API functions 19element is called a I<tag> in L<AnyEvent::MP>, as some API functions
20(C<rcv>) support matching it directly. 20(C<rcv>) support matching it directly.
21 21
22Supposedly you want to send a ping message with your current time to 22Supposedly you want to send some kind of ping message with your current
23somewhere, this is how such a message might look like (in Perl syntax): 23time to somewhere, this is how such a message might look like (in Perl
24syntax):
24 25
25 ping => 1251381636 26 ping => 1251381636
26 27
27Now that we know what a message is, to which entities are those 28Now that we know what a message is, to which entities are those
28messages being I<passed>? They are I<passed> to I<ports>. A I<port> is 29messages being I<passed>? They are I<passed> to I<ports>. A I<port> is

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines