… | |
… | |
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. |
… | |
… | |
571 | authentication and can use TLS. |
582 | authentication and can use TLS. |
572 | |
583 | |
573 | AEMP can use a proven protocol - SSL/TLS - to protect connections and |
584 | AEMP can use a proven protocol - SSL/TLS - to protect connections and |
574 | securely authenticate nodes. |
585 | securely authenticate nodes. |
575 | |
586 | |
|
|
587 | =item * The AEMP protocol is optimised for both text-based and binary |
|
|
588 | communications. |
|
|
589 | |
|
|
590 | The AEMP protocol, unlike the erlang protocol, supports both |
|
|
591 | language-independent text-only protocols (good for debugging) and binary, |
|
|
592 | language-specific serialisers (e.g. Storable). |
|
|
593 | |
|
|
594 | It has also been carefully designed to be implementable in other languages |
|
|
595 | with a minimum of work while gracefully degrading fucntionality to make the |
|
|
596 | protocol simple. |
|
|
597 | |
576 | =back |
598 | =back |
577 | |
599 | |
578 | =head1 SEE ALSO |
600 | =head1 SEE ALSO |
579 | |
601 | |
580 | L<AnyEvent>. |
602 | L<AnyEvent>. |