EDA with SAPO
    Broker and Perl
     Pedro Melo <melo@simplicidade.org>
30 Jul, 2008 - Lisbon Perl Mongers Tech Meeting
EDA

• NOT: Economic Development
  Administration
• NOT: European Defence Agency
• NOT: Electronic design automation
• Act...
EDA

• Everything is about events: generation,
  consumption, processing
• Works great with loosely coupled systems
• Very...
Make Money Fast

• Loosely couple systems means you don’t
  have to say you’re sorry
• A new system does not usually requi...
SAPO Broker

• Keyword Bingo: a MOM using P2P Agents,
    providing basic PubSub and Queueing
• Key fact n.1: distributed ...
SAPO Broker
• Implemented in Java, but bindings for Perl,
  Python, Ruby, PHP, C out of the box
• SAPO::Broker module incl...
Distributed P2P
             Server 2




  Server 1              Server 3
Distributed P2P
             Server 2




  Server 1              Server 3
Distributed P2P
             Server 2




  Server 1              Server 3




             Server 4
Distributed P2P
                      Server 2




 Developer Laptop 1              Developer Laptop 2




    Server 1   ...
SAPO Broker Channels

• Offers three types of “channels”
 • Topics
 • Queues
 • “Topic as Queues”
Topics

• Standard Publish/Subscribe
• Someone publishes message, every
  subscriber receives copy
• Drops messages for sl...
Queues

• Processes queue requests
• Several workers consume requests
• Each requests goes to one worker
• System does not...
Topic as Queues
• Twist on normal Topics
• Several worker processes subscribe “as
  one” to a topic
• Notifications will be...
Topics are just strings
• No hidden magic, no hierarchical
  organization
• But you can add your own
• SAPO uses /sapo/<sy...
Wrap up
• EDA systems are easier to scale
• Loosely coupled systems are easier to
  manage
• SAPO Broker is a stable MOM f...
Thanks!
Upcoming SlideShare
Loading in...5
×

EDA with SAPO Broker

860

Published on

Using SAPO Broker to build Event Driven Architectures

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
860
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

EDA with SAPO Broker

  1. 1. EDA with SAPO Broker and Perl Pedro Melo <melo@simplicidade.org> 30 Jul, 2008 - Lisbon Perl Mongers Tech Meeting
  2. 2. EDA • NOT: Economic Development Administration • NOT: European Defence Agency • NOT: Electronic design automation • Actually: Event-driven architecture
  3. 3. EDA • Everything is about events: generation, consumption, processing • Works great with loosely coupled systems • Very asynchronous in nature, someone triggers an event, eventually someone process the event
  4. 4. Make Money Fast • Loosely couple systems means you don’t have to say you’re sorry • A new system does not usually require touching older systems • Need more power? add more consumers/ processors
  5. 5. SAPO Broker • Keyword Bingo: a MOM using P2P Agents, providing basic PubSub and Queueing • Key fact n.1: distributed - no single point of failure, no “head” nodes, no “ultra-peers” • Key fact n. 2: in production for the last 2/3 years at SAPO
  6. 6. SAPO Broker • Implemented in Java, but bindings for Perl, Python, Ruby, PHP, C out of the box • SAPO::Broker module included in the SVN • Soon Net::SAPO::Broker and AnyEvent::SAPO::Broker at CPAN • Basic publishing also possible with HTTP POST or file system (UDP since today)
  7. 7. Distributed P2P Server 2 Server 1 Server 3
  8. 8. Distributed P2P Server 2 Server 1 Server 3
  9. 9. Distributed P2P Server 2 Server 1 Server 3 Server 4
  10. 10. Distributed P2P Server 2 Developer Laptop 1 Developer Laptop 2 Server 1 Server 3 Server 4
  11. 11. SAPO Broker Channels • Offers three types of “channels” • Topics • Queues • “Topic as Queues”
  12. 12. Topics • Standard Publish/Subscribe • Someone publishes message, every subscriber receives copy • Drops messages for slower consumers
  13. 13. Queues • Processes queue requests • Several workers consume requests • Each requests goes to one worker • System does not provide return channel for response, make up your own
  14. 14. Topic as Queues • Twist on normal Topics • Several worker processes subscribe “as one” to a topic • Notifications will be delivered over all workers, each event goes to only one worker • Excellent for heavy processing on busy
  15. 15. Topics are just strings • No hidden magic, no hierarchical organization • But you can add your own • SAPO uses /sapo/<system>/<other>/ <levels>/<here> • You can subscribe with RegExp though :)
  16. 16. Wrap up • EDA systems are easier to scale • Loosely coupled systems are easier to manage • SAPO Broker is a stable MOM for building EDA with Perl • The distributed nature of SAPO Broker makes it better at using all your cores
  17. 17. Thanks!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×