Your SlideShare is downloading. ×
EDA with SAPO Broker
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

EDA with SAPO Broker


Published on

Using SAPO Broker to build Event Driven Architectures

Using SAPO Broker to build Event Driven Architectures

Published in: Technology, Business

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. EDA with SAPO Broker and Perl Pedro Melo <> 30 Jul, 2008 - Lisbon Perl Mongers Tech Meeting
  • 2. EDA • NOT: Economic Development Administration • NOT: European Defence Agency • NOT: Electronic design automation • Actually: Event-driven architecture
  • 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. 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. 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. 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. Distributed P2P Server 2 Server 1 Server 3
  • 8. Distributed P2P Server 2 Server 1 Server 3
  • 9. Distributed P2P Server 2 Server 1 Server 3 Server 4
  • 10. Distributed P2P Server 2 Developer Laptop 1 Developer Laptop 2 Server 1 Server 3 Server 4
  • 11. SAPO Broker Channels • Offers three types of “channels” • Topics • Queues • “Topic as Queues”
  • 12. Topics • Standard Publish/Subscribe • Someone publishes message, every subscriber receives copy • Drops messages for slower consumers
  • 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. 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. 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. 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. Thanks!