… | |
… | |
510 | |
510 | |
511 | =back |
511 | =back |
512 | |
512 | |
513 | =head1 AnyEvent::MP vs. Distributed Erlang |
513 | =head1 AnyEvent::MP vs. Distributed Erlang |
514 | |
514 | |
515 | AnyEvent::MP got lots of its ideas from distributed erlang. Despite the |
515 | AnyEvent::MP got lots of its ideas from distributed erlang (erlang node |
516 | similarities (erlang node == aemp node, erlang process == aemp port and so |
516 | == aemp node, erlang process == aemp port), so many of the documents and |
|
|
517 | programming techniques employed by erlang apply to AnyEvent::MP. Here is a |
|
|
518 | sample: |
|
|
519 | |
|
|
520 | http://www.erlang.se/doc/programming_rules.shtml |
|
|
521 | http://erlang.org/doc/getting_started/part_frame.html # chapters 3 and 4 |
|
|
522 | http://erlang.org/download/erlang-book-part1.pdf # chapters 5 and 6 |
|
|
523 | http://erlang.org/download/armstrong_thesis_2003.pdf # chapters 4 and 5 |
|
|
524 | |
517 | on), there are also some important differences: |
525 | Despite the similarities, there are also some important differences: |
518 | |
526 | |
519 | =over 4 |
527 | =over 4 |
520 | |
528 | |
521 | =item * Node references contain the recipe on how to contact them. |
529 | =item * Node references contain the recipe on how to contact them. |
522 | |
530 | |
523 | Erlang relies on special naming and DNS to work everywhere in the |
531 | Erlang relies on special naming and DNS to work everywhere in the |
524 | same way. AEMP relies on each node knowing it's own address(es), with |
532 | same way. AEMP relies on each node knowing it's own address(es), with |
525 | convenience functionality. |
533 | convenience functionality. |
526 | |
534 | |
|
|
535 | This means that AEMP requires a less tightly controlled environment at the |
|
|
536 | cost of longer node references and a slightly higher management overhead. |
|
|
537 | |
527 | =item * Erlang uses processes and a mailbox, AEMP does not queue. |
538 | =item * Erlang uses processes and a mailbox, AEMP does not queue. |
528 | |
539 | |
529 | Erlang uses processes that selctively receive messages, and therefore |
540 | Erlang uses processes that selctively receive messages, and therefore |
530 | needs a queue. AEMP is event based, queuing messages would serve no useful |
541 | needs a queue. AEMP is event based, queuing messages would serve no useful |
531 | purpose. |
542 | purpose. |