SlideShare a Scribd company logo
1 of 89
Event-Driven Architectures


                                                              Ilya Grigorik
                                                            CTO / AideRSS




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Apr 7th launch:
                                                      Bestest Blog discovery!




Event-Driven Architectures   http://bit.ly/eda-mesh        @igrigorik #meshu #eda
• Request, Response Cycle
          • Event Driven Architectures
          • Cloud Computing

          • Real-time Web!
                                                                              Fully buzzword
          • XMPP & AMQP                                                         compliant!

          • Example

                                                              Questions &
                             The slides…                                                         My blog
                                                              Comments


Event-Driven Architectures           http://bit.ly/eda-mesh             @igrigorik #meshu #eda
Elastic, Event-Driven, Real-time, Staged,
                      Services Oriented Architecture
                                                                   (Ready, ready? Go.)




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
GET /home



                                                GET /home




                                                GET /home
                                                 Response




                                                            Request, Response



Event-Driven Architectures   http://bit.ly/eda-mesh          @igrigorik #meshu #eda
Google: +200ms = -10% searches
         Amazon: +100ms = -5% purchases



                                                GET /home
                                                 Response




                                              Response Time is Everything



Event-Driven Architectures   http://bit.ly/eda-mesh         @igrigorik #meshu #eda
Bottleneck




                                                       Complexity and Time



Event-Driven Architectures    http://bit.ly/eda-mesh      @igrigorik #meshu #eda
“Rails, Django, Seaside, Grails…” cant scale.




                                                      Myth: Slow Frameworks



Event-Driven Architectures   http://bit.ly/eda-mesh         @igrigorik #meshu #eda
Application server: 1-1000+ req/s




                                                  “Fast Enough” Frameworks



Event-Driven Architectures   http://bit.ly/eda-mesh       @igrigorik #meshu #eda
1.   5 ms: Process request
         2.   30 ms: Authenticate user
         3.   90 ms: Contact database & other services
         4.   30 ms: Render response




          Total: 155 ms, 0.5 MB / conn OR 6.5 req / s


                                                Request, Response assembly



Event-Driven Architectures      http://bit.ly/eda-mesh    @igrigorik #meshu #eda
The Proxy Solution



Event-Driven Architectures   http://bit.ly/eda-mesh    @igrigorik #meshu #eda
The “More” Proxy Solution



Event-Driven Architectures   http://bit.ly/eda-mesh            @igrigorik #meshu #eda
This is madness.
                                                              (after a certain point)




Event-Driven Architectures   http://bit.ly/eda-mesh    @igrigorik #meshu #eda
1.   Receive
         2.   Verify
         3.   Dispatch
         4.   Aggregate
         5.   Handle errors
         6.   Render




                                          Throughput != Response Time



Event-Driven Architectures    http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Buzzword: Event-Driven Architectures
                                                      (aka, reinventing the wheel)




Event-Driven Architectures   http://bit.ly/eda-mesh     @igrigorik #meshu #eda
Auto Manufacturing circa 1910




                                                2-3 men, 1-2 days / car

Event-Driven Architectures   http://bit.ly/eda-mesh       @igrigorik #meshu #eda
More
                                                  workers!




                                      Scaling the manufacturing process



Event-Driven Architectures   http://bit.ly/eda-mesh          @igrigorik #meshu #eda
Then Henry Ford came along…




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
And gave us the assembly line!
                                      Scaling the manufacturing process



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Queuing theory

    Lean manufacturing

    Just in time




          Lower response time,
           higher throughput!


    93 seconds / car
    1M + cars / year


Event-Driven Architectures       http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Event Driven Architecture (EDA) = Assembly line
                                                      except, we’re not building cars here…




Event-Driven Architectures   http://bit.ly/eda-mesh           @igrigorik #meshu #eda
1.   5 ms - Receive
                                                                   2.   30 ms - Verify
                        Total: 365 ms, ~ 3 req / s
                                                                   3.   30 ms - Save
                                                                   4.   200 ms – Generate PDF
                                                                   5.   50 ms - Email
                                                                   6.   50 ms - Render



                                                   GET /purchase
                                                            OK




                             Monolith Order Processing (example)



Event-Driven Architectures         http://bit.ly/eda-mesh               @igrigorik #meshu #eda
Can someone else do it?
          Total: 115 ms, ~ 3 req / s

                                                         1.   5 ms – Receive                     No
          ~ 70% improvement in
                                                         2.   30 ms - Verify                     No
              response time!
                                                         3.   30 ms – Save                       No
                                                         4.   200 ms – Generate PDF              Yes
                                                         5.   50 ms – Email                      Yes
                                                         6.   50 ms – Render                     Yes


                                                GET /purchase
                                                          OK




                    Assembly Line Order Processing (example)



Event-Driven Architectures      http://bit.ly/eda-mesh                  @igrigorik #meshu #eda
1.   5 ms - Receive
   2.   30 ms - Verify
   3.   30 ms - Save
                                                     1. Generate PDF
   4.   10 ms – Dispatch                                                              1. Email PDF
                                                     2. Dispatch
   5.   50 ms – Render

   Total: 125 ms

                     GET /purchase

                             OK




                    Assembly Line Order Processing (example)



Event-Driven Architectures        http://bit.ly/eda-mesh               @igrigorik #meshu #eda
1.   5 ms - Receive
   2.   30 ms - Verify
   3.   30 ms - Save
                                                     1. Generate PDF
   4.   10 ms – Dispatch                                                              1. Email PDF
                                                     2. Dispatch
   5.   50 ms – Render

   Total: 125 ms

                     GET /purchase

                             OK




                        Event-Driven Staged Architecture (SEDA)



Event-Driven Architectures        http://bit.ly/eda-mesh               @igrigorik #meshu #eda
Don’t keep the client waiting!
                                                                          “Can I defer it?”




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
PDF service layer                   Email service layer


                     GET /purchase

                             OK




                                  Services Oriented Architecture (SOA)
                                                                       helps you maintain your sanity




Event-Driven Architectures          http://bit.ly/eda-mesh               @igrigorik #meshu #eda
Scalability of service layer




                     GET /purchase

                             OK




                                                            SOA = Simple(r) Scalability



Event-Driven Architectures         http://bit.ly/eda-mesh            @igrigorik #meshu #eda
Elastic Computing
                                                                       EC2 & Virtualization




Event-Driven Architectures   http://bit.ly/eda-mesh      @igrigorik #meshu #eda
3 servers (always): $216 / month
                        $0.10 / hour
                                                          3 servers (elastic): $120 / month




                                                          0AM – 8AM




                                                 8AM – 24PM




                                  Elastic Computing (Pay by the sip)



Event-Driven Architectures       http://bit.ly/eda-mesh           @igrigorik #meshu #eda
100 computers * 1 hour = 1 computer * 100 hours




                              Elastic Computing (Pay by the sip)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Era of Parallelism



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Elastic car
    manufacturing?



    High capital
    investment



    People & Unions



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Elastic Computing = Assembly Line 2.0
                                                                    EC2 & Virtualization




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Elastic, Event-Driven, Staged, Services
                                  Oriented Architecture
                                                                    (that’s a mouthful)




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Phew.




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Buzzword: Real-time web
                                             Scientific translation: really, really, really, fast




Event-Driven Architectures   http://bit.ly/eda-mesh               @igrigorik #meshu #eda
Ouch!




                                                        Really fast
                             Millions of
                                                        response
                               users
                                                          time




                                                                    Real-time pain



Event-Driven Architectures     http://bit.ly/eda-mesh        @igrigorik #meshu #eda
HTTP? DB? …          HTTP? Queue? …




                                                      Real-time communication



Event-Driven Architectures   http://bit.ly/eda-mesh          @igrigorik #meshu #eda
Emerging Standards: XMPP & AMQP




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
From: A, To: B                                                   From: A, To: B
           Hello!                                                           Hello!




             Extensible Messaging and Presence Protocol (XMPP)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Event-stream
                       protocol




           Persistent
          connections


                                                                                     Presence


                   Identity and
                                                                       XMPP Features
                  authentication




Event-Driven Architectures         http://bit.ly/eda-mesh   @igrigorik #meshu #eda
User               Domain              Resource


                                      ilya@aiderss.com/office

            Jabber Software
              Foundation




                             JID: Federation, Identity & Authentication



Event-Driven Architectures     http://bit.ly/eda-mesh            @igrigorik #meshu #eda
<message from=quot;ilya@aiderss.com/officequot; type=quot;chatquot; to=quot;ilya@igvita.comquot; id=quot;aae1aquot;>
            <body>hello</body>
            <active xmlns=quot;http://jabber.org/protocol/chatstatesquot;/>
         </message>




         Very verbose
        protocol (XML)




                                   Example: Message Routing with XMPP



Event-Driven Architectures       http://bit.ly/eda-mesh          @igrigorik #meshu #eda
XMPP in the wild: Google Talk



Event-Driven Architectures   http://bit.ly/eda-mesh            @igrigorik #meshu #eda
XMPP in the wild: Google Talk + Video



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Psi: cross-platform Jabber/XMPP client



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
require quot;rubygemsquot;
   require quot;xmpp4rquot;

   jid = Jabber::JID::new(quot;ilya@aiderss.comquot;)
   client = Jabber::Client.new(jid)
   client.connect(quot;talk.google.comquot;)
   client.auth(quot;passwordquot;)

   to = quot;ilya@aiderss.comquot;
   subject = quot;Jabber clientquot;
   message = quot;Hello XMPP World!quot;

   piclient.send Jabber::Message::new(to, message).set_subject(subject)

   # <message to='ilya@igvita.com'>
   # <body>Hello XMPP World!</body>
   # <subject>Jabber client</subject>
                                                      XMPP4R (Ruby) Demo
   # </message>




Event-Driven Architectures   http://bit.ly/eda-mesh      @igrigorik #meshu #eda
require quot;rubygemsquot;
   require quot;xmpp4rquot;

   jid = Jabber::JID::new(quot;ilya@aiderss.comquot;)
   client = Jabber::Client.new(jid)
   client.connect(quot;talk.google.comquot;)
   client.auth(quot;passwordquot;)

   to = quot;ilya@aiderss.comquot;
   subject = quot;Jabber clientquot;
   message = quot;Hello XMPP World!quot;

   piclient.send Jabber::Message::new(to, message).set_subject(subject)

   # <message to='ilya@igvita.com'>
   # <body>Hello XMPP World!</body>
   # <subject>Jabber client</subject>
                                                      XMPP4R (Ruby) Demo
   # </message>




Event-Driven Architectures   http://bit.ly/eda-mesh      @igrigorik #meshu #eda
client.send(Jabber::Presence.new.set_type(:away))

    # <presence from='daniel@aiderss.com/iMac8D2CB97D'
    to='ilya@aiderss.com/0EDD826C' xmlns='jabber:client'>
    # <show>away</show>
    # <priority>0</priority>
    # <x xmlns='http://www.apple.com/xmpp/idle'>
    # <idle-since>2009-04-01T21:48:15Z</idle-since>
                                                                    Client Idle…
    # </x>
    # </presence>

    client.add_message_callback do |m|
     puts quot;#{m.from} -- #{m.body}quot;
    end

    # > daniel@aiderss.com -- Hey!

                                                        XMPP4R (Ruby) Demo



Event-Driven Architectures   http://bit.ly/eda-mesh       @igrigorik #meshu #eda
client.send(Jabber::Presence.new.set_type(:available))

    # <presence from='daniel@aiderss.com/iMac8D2CB97D'
    to='ilya@aiderss.com/0EDD826C' xmlns='jabber:client'>
    # <show>away</show>
    # <priority>0</priority>
    # <x xmlns='http://www.apple.com/xmpp/idle'>
    # <idle-since>2009-04-01T21:48:15Z</idle-since>
                                                                       Client Idle…
    # </x>
    # </presence>

    client.add_message_callback do |m|
     puts quot;#{m.from} -- #{m.body}quot;
    end

    # > daniel@aiderss.com -- Hey!

                                                       XMPP4R (Ruby) Demo



Event-Driven Architectures    http://bit.ly/eda-mesh         @igrigorik #meshu #eda
One-to-many distribution



Event-Driven Architectures   http://bit.ly/eda-mesh        @igrigorik #meshu #eda
XEP-0060: Publish-Subscribe (Pubsub)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Many wasteful checks




                   Data?       No      Data?          No   Data?                 Yes




                               HTTP / SMTP Polling: painful, wasteful



Event-Driven Architectures   http://bit.ly/eda-mesh           @igrigorik #meshu #eda
Persistent connection




               Subscribe                                                 New message!




                                                           Publish-Subscribe



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
<iq type='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit' id='pub1'>
     <pubsub xmlns='http://jabber.org/protocol/pubsub'>
      <publish node='princely_musings'>
                                                                                 IQ Stanza
       <item>
        <entry xmlns='http://www.w3.org/2005/Atom'>
          <title>Soliloquy<title>
          <summary>
           To be, or not to be: that is the question!
          <summary>
          <link rel='alternate' type='text/html'
              href='http://denmark.lit/2003/12/13/atom03'/>
          <id>tag:denmark.lit,2003:entry-32397</id>
          <published>2003-12-13T18:30:02Z</published>
          <updated>2003-12-13T18:30:02Z</updated>
        </entry>
       </item>

      </publish>
                                                          PubSub Protocol: Client XML
     </pubsub>
    </iq>




Event-Driven Architectures       http://bit.ly/eda-mesh           @igrigorik #meshu #eda
<iq type='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit' id='pub1'>
     <pubsub xmlns='http://jabber.org/protocol/pubsub'>
      <publish node='princely_musings'>

       <item>
        <entry xmlns='http://www.w3.org/2005/Atom'>
         <title>Soliloquy<title>
         <summary>
           To be, or not to be: that is the question!
         <summary>
         <link rel='alternate' type='text/html'
                                                                                   AtomPub
             href='http://denmark.lit/2003/12/13/atom03'/>
         <id>tag:denmark.lit,2003:entry-32397</id>
         <published>2003-12-13T18:30:02Z</published>
         <updated>2003-12-13T18:30:02Z</updated>
        </entry>
       </item>

      </publish>
                                                          PubSub Protocol: Client XML
     </pubsub>
    </iq>




Event-Driven Architectures       http://bit.ly/eda-mesh           @igrigorik #meshu #eda
Distribute




         Publish                 XEP-0060: Publish-Subscribe (Pubsub)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>
     <event xmlns='http://jabber.org/protocol/pubsub#event'>
      <items node='princely_musings'>
       <item id='ae890ac52d0df67ed7cfdf51b644e901'>
         [ ... ENTRY ... ]                                               Subscriber A
       </item>
      </items>
     </event>
    </message>

    <message from='pubsub.shakespeare.lit' to='bernardo@denmark.lit' id='bar'>
     <event xmlns='http://jabber.org/protocol/pubsub#event'>
      <items node='princely_musings'>
       <item id='ae890ac52d0df67ed7cfdf51b644e901'>
                                                                        Subscriber B
         [ ... ENTRY ... ]
       </item>
      </items>
     </event>
    </message>
                                    XEP-0060: Publish-Subscribe (Pubsub)



Event-Driven Architectures      http://bit.ly/eda-mesh        @igrigorik #meshu #eda
Seems neat, but so what?




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
XMPP                   XMPP




                                                      Real-time communication



Event-Driven Architectures   http://bit.ly/eda-mesh          @igrigorik #meshu #eda
XMPP                            XMPP                   XMPP




                                                       Real-time communication



Event-Driven Architectures    http://bit.ly/eda-mesh          @igrigorik #meshu #eda
Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
require 'fire_hydrant'
   require 'yaml'

   hydrant = FireHydrant.new(YAML.load(File.read(quot;config.ymlquot;)))

   hydrant.on_location_update do |user|
    puts quot;#{user.token} has moved to #{user.locations.first}.quot;              Push notifications
   end

   hydrant.run!



                                                       Ruby + FireEagle via XMPP



Event-Driven Architectures    http://bit.ly/eda-mesh         @igrigorik #meshu #eda
Presence: available




                     GET /purchase

                             OK




                                                   Elastic Computing + Presence



Event-Driven Architectures          http://bit.ly/eda-mesh    @igrigorik #meshu #eda
Ejabberd                                       Erlang
                                                              Defacto XMPP server
   Djabberd                                       Perl
   OpenFire                                       Java
                                                                  RPM, GUI, shiny
   Tigase                                         Java




                                                      XMPP / Jabber Servers



Event-Driven Architectures   http://bit.ly/eda-mesh        @igrigorik #meshu #eda
Advanced Message Queuing Protocol
                                           (AMQP)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
“AMQP is an open Internet Protocol for Business Messaging”



                             AMQP Working Group (16 companies)



Event-Driven Architectures      http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Consumer
                             AMQP Broker




                              Publisher
                                                      AMQP Architecture



Event-Driven Architectures   http://bit.ly/eda-mesh     @igrigorik #meshu #eda
Broker Clustering




                                                         AMQP Clustering



Event-Driven Architectures      http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Routing key: usd.stock.amz
                               Message: I like AMZ!



                       Direct                           Topic            Fanout
                      Exchange                        Exchange          Exchange




                                                            AMQP Broker Internals



Event-Driven Architectures         http://bit.ly/eda-mesh        @igrigorik #meshu #eda
Routing key: usd.stock.amz
                               Message: I like AMZ!



                       Direct                           Topic                  Fanout
                      Exchange                        Exchange                Exchange




                                                                   Name: amazon
                                 Queue
                                                                 Bind: usd.stock.amz



                                                            AMQP Direct Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh              @igrigorik #meshu #eda
Routing key: usd.stock.amz
                               Message: I like AMZ!



                       Direct                           Topic                   Fanout
                      Exchange                        Exchange                 Exchange




               Queue             Queue                           Message: I like AMZ!




                                                            AMQP Direct Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh               @igrigorik #meshu #eda
Routing key: usd.stock.msft
                              Message: I like Microsoft!



                       Direct                           Topic                 Fanout
                      Exchange                        Exchange               Exchange




                                                                   Name: stocks
                                 Queue
                                                                 Bind: usd.stock.*



                                                             AMQP Topic Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh             @igrigorik #meshu #eda
Routing key: usd.stock.msft
                              Message: I like Microsoft!



                       Direct                           Topic                Fanout
                      Exchange                        Exchange              Exchange




                                 Queue                      Message: I like Microsoft!




                                                             AMQP Topic Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh            @igrigorik #meshu #eda
Routing key: usd.stock.msft
                              Message: I like Microsoft!



                       Direct                           Topic               Fanout
                      Exchange                        Exchange             Exchange




                  Queue          Queue                           Name: stocks
                    1              2                               Bind: “”



                                                            AMQP Fanout Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh           @igrigorik #meshu #eda
Routing key: usd.stock.msft
                              Message: I like Microsoft!



                       Direct                           Topic                Fanout
                      Exchange                        Exchange              Exchange




                  Queue          Queue
                                                            Message: I like Microsoft
                    1              2



                                                            AMQP Fanout Exchange



Event-Driven Architectures         http://bit.ly/eda-mesh            @igrigorik #meshu #eda
AMQP Kung-fu: Load-balancing




Event-Driven Architectures    http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Routing key: usd.stock.amz
                               Message: I like AMZ!



                       Direct                           Topic                Fanout
                      Exchange                        Exchange              Exchange




                        Queue                  Only one client gets the message!




                                                                 AMQP Load Balancing



Event-Driven Architectures         http://bit.ly/eda-mesh            @igrigorik #meshu #eda
Bind: purchase.pdf




                     GET /purchase

                             OK




                                                 Elastic AMQP Load-balancing



Event-Driven Architectures        http://bit.ly/eda-mesh    @igrigorik #meshu #eda
AMQP Kung-fu: Persistence & Durability




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Routing key: usd.stock.amz
                               Message: I like AMZ!



                       Direct                           Topic                    Fanout
                      Exchange                        Exchange                  Exchange




                                                             Durable: True
                        Queue
                                                            Persistent: True



                                            AMQP Persistence & Durability



Event-Driven Architectures         http://bit.ly/eda-mesh                @igrigorik #meshu #eda
Almost there :)



Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
require 'mq'

    AMQP.start(:host => 'amqp-server.com') do
                                                                                Publisher
      mq = MQ.new
      mq.topic('stocks').publish(quot;5.95quot;, :key => quot;usd.amzquot;)

    end



    AMQP.start(:host => 'amqp-server.com') do

      mq = MQ.new
      mq.queue('amazon stock').bind(mq.topic('stocks'), :key => 'usd.amz').subscribe{ |price|
        print 'apple stock', price
      }

    end
                                                              AMQP + Ruby Example



Event-Driven Architectures       http://bit.ly/eda-mesh          @igrigorik #meshu #eda
require 'mq'

    AMQP.start(:host => 'amqp-server.com') do

      mq = MQ.new
      mq.topic('stocks').publish(quot;5.95quot;, :key => quot;usd.amzquot;)

    end



                                                                               Consumer
    AMQP.start(:host => 'amqp-server.com') do

      mq = MQ.new
      mq.queue('amazon stock').bind(mq.topic('stocks'), :key => 'usd.amz').subscribe{ |price|
        print ‘amazon stock', price
      }

    end
                                                              AMQP + Ruby Example



Event-Driven Architectures       http://bit.ly/eda-mesh          @igrigorik #meshu #eda
Elastic, Event-Driven, <Real-time>,
               Staged, Services Oriented Architecture
                                                                               (oi…)




Event-Driven Architectures   http://bit.ly/eda-mesh   @igrigorik #meshu #eda
XMPP / AMQP




                             Publisher



                                                            Elastic Architecture



Event-Driven Architectures         http://bit.ly/eda-mesh     @igrigorik #meshu #eda
XMPP / AMQP




            Subscribe
                                         Exposing Publish-Subscribe API



Event-Driven Architectures      http://bit.ly/eda-mesh   @igrigorik #meshu #eda
Thanks.

                                                              Questions &
                             The slides…                                                           My blog
                                                              Comments


Event-Driven Architectures           http://bit.ly/eda-mesh             @igrigorik #meshu #eda

More Related Content

What's hot

Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyKyle Drake
 
No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010Ilya Grigorik
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Frameworkjfarcand
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scalajfarcand
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!jfarcand
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsSergi Almar i Graupera
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkFabio Tiriticco
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problemJose Galarza
 
Using Websockets with Play!
Using Websockets with Play!Using Websockets with Play!
Using Websockets with Play!Andrew Conner
 
Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with FlowdockFlowdock
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesDan Jenkins
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for PerlPerrin Harkins
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !Knoldus Inc.
 

What's hot (20)

Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
 
No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010No Callbacks, No Threads - RailsConf 2010
No Callbacks, No Threads - RailsConf 2010
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Framework
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!
 
WebSockets with Spring 4
WebSockets with Spring 4WebSockets with Spring 4
WebSockets with Spring 4
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Communication in Python and the C10k problem
Communication in Python and the C10k problemCommunication in Python and the C10k problem
Communication in Python and the C10k problem
 
Using Websockets with Play!
Using Websockets with Play!Using Websockets with Play!
Using Websockets with Play!
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 
Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with Flowdock
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilities
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !
 

Similar to Event Driven Architecture - MeshU - Ilya Grigorik

From Grids To Clouds Guy Tel Zur May 2009
From Grids To Clouds Guy Tel Zur May 2009From Grids To Clouds Guy Tel Zur May 2009
From Grids To Clouds Guy Tel Zur May 2009Guy Tel-Zur
 
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoTWebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoTFrank Greco
 
Isolating GPU Access in its Own Process (Foss-North 2018)
Isolating GPU Access in its Own Process (Foss-North 2018)Isolating GPU Access in its Own Process (Foss-North 2018)
Isolating GPU Access in its Own Process (Foss-North 2018)Patricia Aas
 
Essential Tools For Data Comm Engineers
Essential Tools For Data Comm EngineersEssential Tools For Data Comm Engineers
Essential Tools For Data Comm EngineersSyed Abdul Basit
 
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)Andy Davies
 
Gojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsGojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsDaniel Zivkovic
 
Life on the Edge with ESI
Life on the Edge with ESILife on the Edge with ESI
Life on the Edge with ESIKit Chan
 
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...Submer Immersion Cooling
 
Edge computing in practice using IoT, Tensorflow and Google Cloud
Edge computing in practice using IoT, Tensorflow and Google CloudEdge computing in practice using IoT, Tensorflow and Google Cloud
Edge computing in practice using IoT, Tensorflow and Google CloudAlvaro Viebrantz
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterDoris Chen
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Sniffing the Mobile Context
Sniffing the Mobile ContextSniffing the Mobile Context
Sniffing the Mobile ContextAndy Davies
 
Memaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.jsMemaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.jsCodePolitan
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Soroosh Khodami
 
Metaverse - The 'Killer App' for 5G, 6G and Beyond
Metaverse - The 'Killer App' for 5G, 6G and BeyondMetaverse - The 'Killer App' for 5G, 6G and Beyond
Metaverse - The 'Killer App' for 5G, 6G and BeyondAnand Bhojan
 
Imagesandvideo voxxeddays
Imagesandvideo voxxeddaysImagesandvideo voxxeddays
Imagesandvideo voxxeddaysDoug Sillars
 
Isolating GPU Access in its Own Process
Isolating GPU Access in its Own ProcessIsolating GPU Access in its Own Process
Isolating GPU Access in its Own ProcessPatricia Aas
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptFITC
 
Rocketick accelerated verilog simulations
Rocketick  accelerated verilog simulationsRocketick  accelerated verilog simulations
Rocketick accelerated verilog simulationschiportal
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosPeter Moskovits
 

Similar to Event Driven Architecture - MeshU - Ilya Grigorik (20)

From Grids To Clouds Guy Tel Zur May 2009
From Grids To Clouds Guy Tel Zur May 2009From Grids To Clouds Guy Tel Zur May 2009
From Grids To Clouds Guy Tel Zur May 2009
 
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoTWebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
 
Isolating GPU Access in its Own Process (Foss-North 2018)
Isolating GPU Access in its Own Process (Foss-North 2018)Isolating GPU Access in its Own Process (Foss-North 2018)
Isolating GPU Access in its Own Process (Foss-North 2018)
 
Essential Tools For Data Comm Engineers
Essential Tools For Data Comm EngineersEssential Tools For Data Comm Engineers
Essential Tools For Data Comm Engineers
 
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)
 
Gojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applicationsGojko's 5 rules for super responsive Serverless applications
Gojko's 5 rules for super responsive Serverless applications
 
Life on the Edge with ESI
Life on the Edge with ESILife on the Edge with ESI
Life on the Edge with ESI
 
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...
Your Nextgen Datacenter will be Faster, Cooler and Automated webinar (07-09-2...
 
Edge computing in practice using IoT, Tensorflow and Google Cloud
Edge computing in practice using IoT, Tensorflow and Google CloudEdge computing in practice using IoT, Tensorflow and Google Cloud
Edge computing in practice using IoT, Tensorflow and Google Cloud
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
 
[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design[refreshaustin] Adaptive Images in Responsive Web Design
[refreshaustin] Adaptive Images in Responsive Web Design
 
Sniffing the Mobile Context
Sniffing the Mobile ContextSniffing the Mobile Context
Sniffing the Mobile Context
 
Memaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.jsMemaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.js
 
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
Why And When Should We Consider Stream Processing In Our Solutions Teqnation ...
 
Metaverse - The 'Killer App' for 5G, 6G and Beyond
Metaverse - The 'Killer App' for 5G, 6G and BeyondMetaverse - The 'Killer App' for 5G, 6G and Beyond
Metaverse - The 'Killer App' for 5G, 6G and Beyond
 
Imagesandvideo voxxeddays
Imagesandvideo voxxeddaysImagesandvideo voxxeddays
Imagesandvideo voxxeddays
 
Isolating GPU Access in its Own Process
Isolating GPU Access in its Own ProcessIsolating GPU Access in its Own Process
Isolating GPU Access in its Own Process
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScript
 
Rocketick accelerated verilog simulations
Rocketick  accelerated verilog simulationsRocketick  accelerated verilog simulations
Rocketick accelerated verilog simulations
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and Demos
 

More from Ilya Grigorik

Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it worksIlya Grigorik
 
Making the web fast(er) - RailsConf 2012
Making the web fast(er) - RailsConf 2012Making the web fast(er) - RailsConf 2012
Making the web fast(er) - RailsConf 2012Ilya Grigorik
 
Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011Ilya Grigorik
 
Intelligent Ruby + Machine Learning
Intelligent Ruby + Machine LearningIntelligent Ruby + Machine Learning
Intelligent Ruby + Machine LearningIlya Grigorik
 
Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebIlya Grigorik
 
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ilya Grigorik
 
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Ilya Grigorik
 
Leveraging Social Media - Strategies & Tactics - PostRank
Leveraging Social Media - Strategies & Tactics - PostRankLeveraging Social Media - Strategies & Tactics - PostRank
Leveraging Social Media - Strategies & Tactics - PostRankIlya Grigorik
 
Building Mini Google in Ruby
Building Mini Google in RubyBuilding Mini Google in Ruby
Building Mini Google in RubyIlya Grigorik
 
Taming The RSS Beast
Taming The  RSS  BeastTaming The  RSS  Beast
Taming The RSS BeastIlya Grigorik
 

More from Ilya Grigorik (10)

Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
 
Making the web fast(er) - RailsConf 2012
Making the web fast(er) - RailsConf 2012Making the web fast(er) - RailsConf 2012
Making the web fast(er) - RailsConf 2012
 
Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011
 
Intelligent Ruby + Machine Learning
Intelligent Ruby + Machine LearningIntelligent Ruby + Machine Learning
Intelligent Ruby + Machine Learning
 
Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time Web
 
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09
 
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
 
Leveraging Social Media - Strategies & Tactics - PostRank
Leveraging Social Media - Strategies & Tactics - PostRankLeveraging Social Media - Strategies & Tactics - PostRank
Leveraging Social Media - Strategies & Tactics - PostRank
 
Building Mini Google in Ruby
Building Mini Google in RubyBuilding Mini Google in Ruby
Building Mini Google in Ruby
 
Taming The RSS Beast
Taming The  RSS  BeastTaming The  RSS  Beast
Taming The RSS Beast
 

Recently uploaded

Data skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsData skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsyasinnathani
 
Live-Streaming in the Music Industry Webinar
Live-Streaming in the Music Industry WebinarLive-Streaming in the Music Industry Webinar
Live-Streaming in the Music Industry WebinarNathanielSchmuck
 
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfPDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfHajeJanKamps
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhangmcgroupjeya
 
Intellectual Property Licensing Examples
Intellectual Property Licensing ExamplesIntellectual Property Licensing Examples
Intellectual Property Licensing Examplesamberjiles31
 
Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access
 
MoneyBridge Pitch Deck - Investor Presentation
MoneyBridge Pitch Deck - Investor PresentationMoneyBridge Pitch Deck - Investor Presentation
MoneyBridge Pitch Deck - Investor Presentationbaron83
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinAnton Skornyakov
 
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdf
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdfChicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdf
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdfSourav Sikder
 
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxCracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxWorkforce Group
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxJemalSeid25
 
Mihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZMihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZKanakChauhan5
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursKaiNexus
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView
 
To Create Your Own Wig Online To Create Your Own Wig Online
To Create Your Own Wig Online  To Create Your Own Wig OnlineTo Create Your Own Wig Online  To Create Your Own Wig Online
To Create Your Own Wig Online To Create Your Own Wig Onlinelng ths
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023Steve Rader
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)tazeenaila12
 
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptx
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptxHELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptx
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptxHelene Heckrotte
 

Recently uploaded (20)

Data skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story pointsData skills for Agile Teams- Killing story points
Data skills for Agile Teams- Killing story points
 
Live-Streaming in the Music Industry Webinar
Live-Streaming in the Music Industry WebinarLive-Streaming in the Music Industry Webinar
Live-Streaming in the Music Industry Webinar
 
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdfPDT 89 - $1.4M - Seed - Plantee Innovations.pdf
PDT 89 - $1.4M - Seed - Plantee Innovations.pdf
 
WAM Corporate Presentation Mar 25 2024.pdf
WAM Corporate Presentation Mar 25 2024.pdfWAM Corporate Presentation Mar 25 2024.pdf
WAM Corporate Presentation Mar 25 2024.pdf
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhang
 
Intellectual Property Licensing Examples
Intellectual Property Licensing ExamplesIntellectual Property Licensing Examples
Intellectual Property Licensing Examples
 
Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024
 
MoneyBridge Pitch Deck - Investor Presentation
MoneyBridge Pitch Deck - Investor PresentationMoneyBridge Pitch Deck - Investor Presentation
MoneyBridge Pitch Deck - Investor Presentation
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup Berlin
 
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdf
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdfChicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdf
Chicago Medical Malpractice Lawyer Chicago Medical Malpractice Lawyer.pdf
 
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptxCracking the ‘Business Process Outsourcing’ Code Main.pptx
Cracking the ‘Business Process Outsourcing’ Code Main.pptx
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptx
 
Mihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZMihir Menda - Member of Supervisory Board at RMZ
Mihir Menda - Member of Supervisory Board at RMZ
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, Ours
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
 
To Create Your Own Wig Online To Create Your Own Wig Online
To Create Your Own Wig Online  To Create Your Own Wig OnlineTo Create Your Own Wig Online  To Create Your Own Wig Online
To Create Your Own Wig Online To Create Your Own Wig Online
 
NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023NASA CoCEI Scaling Strategy - November 2023
NASA CoCEI Scaling Strategy - November 2023
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
 
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptx
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptxHELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptx
HELENE HECKROTTE'S PROFESSIONAL PORTFOLIO.pptx
 

Event Driven Architecture - MeshU - Ilya Grigorik

  • 1. Event-Driven Architectures Ilya Grigorik CTO / AideRSS Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 2. Apr 7th launch: Bestest Blog discovery! Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 3. • Request, Response Cycle • Event Driven Architectures • Cloud Computing • Real-time Web! Fully buzzword • XMPP & AMQP compliant! • Example Questions & The slides… My blog Comments Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 4. Elastic, Event-Driven, Real-time, Staged, Services Oriented Architecture (Ready, ready? Go.) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 5. GET /home GET /home GET /home Response Request, Response Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 6. Google: +200ms = -10% searches Amazon: +100ms = -5% purchases GET /home Response Response Time is Everything Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 7. Bottleneck Complexity and Time Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 8. “Rails, Django, Seaside, Grails…” cant scale. Myth: Slow Frameworks Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 9. Application server: 1-1000+ req/s “Fast Enough” Frameworks Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 10. 1. 5 ms: Process request 2. 30 ms: Authenticate user 3. 90 ms: Contact database & other services 4. 30 ms: Render response Total: 155 ms, 0.5 MB / conn OR 6.5 req / s Request, Response assembly Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 11. The Proxy Solution Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 12. The “More” Proxy Solution Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 13. This is madness. (after a certain point) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 14. 1. Receive 2. Verify 3. Dispatch 4. Aggregate 5. Handle errors 6. Render Throughput != Response Time Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 15. Buzzword: Event-Driven Architectures (aka, reinventing the wheel) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 16. Auto Manufacturing circa 1910 2-3 men, 1-2 days / car Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 17. More workers! Scaling the manufacturing process Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 18. Then Henry Ford came along… Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 19. And gave us the assembly line! Scaling the manufacturing process Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 20. Queuing theory Lean manufacturing Just in time Lower response time, higher throughput! 93 seconds / car 1M + cars / year Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 21. Event Driven Architecture (EDA) = Assembly line except, we’re not building cars here… Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 22. 1. 5 ms - Receive 2. 30 ms - Verify Total: 365 ms, ~ 3 req / s 3. 30 ms - Save 4. 200 ms – Generate PDF 5. 50 ms - Email 6. 50 ms - Render GET /purchase OK Monolith Order Processing (example) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 23. Can someone else do it? Total: 115 ms, ~ 3 req / s 1. 5 ms – Receive No ~ 70% improvement in 2. 30 ms - Verify No response time! 3. 30 ms – Save No 4. 200 ms – Generate PDF Yes 5. 50 ms – Email Yes 6. 50 ms – Render Yes GET /purchase OK Assembly Line Order Processing (example) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 24. 1. 5 ms - Receive 2. 30 ms - Verify 3. 30 ms - Save 1. Generate PDF 4. 10 ms – Dispatch 1. Email PDF 2. Dispatch 5. 50 ms – Render Total: 125 ms GET /purchase OK Assembly Line Order Processing (example) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 25. 1. 5 ms - Receive 2. 30 ms - Verify 3. 30 ms - Save 1. Generate PDF 4. 10 ms – Dispatch 1. Email PDF 2. Dispatch 5. 50 ms – Render Total: 125 ms GET /purchase OK Event-Driven Staged Architecture (SEDA) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 26. Don’t keep the client waiting! “Can I defer it?” Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 27. PDF service layer Email service layer GET /purchase OK Services Oriented Architecture (SOA) helps you maintain your sanity Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 28. Scalability of service layer GET /purchase OK SOA = Simple(r) Scalability Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 29. Elastic Computing EC2 & Virtualization Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 30. 3 servers (always): $216 / month $0.10 / hour 3 servers (elastic): $120 / month 0AM – 8AM 8AM – 24PM Elastic Computing (Pay by the sip) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 31. 100 computers * 1 hour = 1 computer * 100 hours Elastic Computing (Pay by the sip) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 32. Era of Parallelism Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 33. Elastic car manufacturing? High capital investment People & Unions Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 34. Elastic Computing = Assembly Line 2.0 EC2 & Virtualization Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 35. Elastic, Event-Driven, Staged, Services Oriented Architecture (that’s a mouthful) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 36. Phew. Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 37. Buzzword: Real-time web Scientific translation: really, really, really, fast Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 38. Ouch! Really fast Millions of response users time Real-time pain Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 39. HTTP? DB? … HTTP? Queue? … Real-time communication Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 40. Emerging Standards: XMPP & AMQP Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 41. From: A, To: B From: A, To: B Hello! Hello! Extensible Messaging and Presence Protocol (XMPP) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 42. Event-stream protocol Persistent connections Presence Identity and XMPP Features authentication Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 43. User Domain Resource ilya@aiderss.com/office Jabber Software Foundation JID: Federation, Identity & Authentication Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 44. <message from=quot;ilya@aiderss.com/officequot; type=quot;chatquot; to=quot;ilya@igvita.comquot; id=quot;aae1aquot;> <body>hello</body> <active xmlns=quot;http://jabber.org/protocol/chatstatesquot;/> </message> Very verbose protocol (XML) Example: Message Routing with XMPP Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 45. XMPP in the wild: Google Talk Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 46. XMPP in the wild: Google Talk + Video Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 47. Psi: cross-platform Jabber/XMPP client Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 48. require quot;rubygemsquot; require quot;xmpp4rquot; jid = Jabber::JID::new(quot;ilya@aiderss.comquot;) client = Jabber::Client.new(jid) client.connect(quot;talk.google.comquot;) client.auth(quot;passwordquot;) to = quot;ilya@aiderss.comquot; subject = quot;Jabber clientquot; message = quot;Hello XMPP World!quot; piclient.send Jabber::Message::new(to, message).set_subject(subject) # <message to='ilya@igvita.com'> # <body>Hello XMPP World!</body> # <subject>Jabber client</subject> XMPP4R (Ruby) Demo # </message> Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 49. require quot;rubygemsquot; require quot;xmpp4rquot; jid = Jabber::JID::new(quot;ilya@aiderss.comquot;) client = Jabber::Client.new(jid) client.connect(quot;talk.google.comquot;) client.auth(quot;passwordquot;) to = quot;ilya@aiderss.comquot; subject = quot;Jabber clientquot; message = quot;Hello XMPP World!quot; piclient.send Jabber::Message::new(to, message).set_subject(subject) # <message to='ilya@igvita.com'> # <body>Hello XMPP World!</body> # <subject>Jabber client</subject> XMPP4R (Ruby) Demo # </message> Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 50. client.send(Jabber::Presence.new.set_type(:away)) # <presence from='daniel@aiderss.com/iMac8D2CB97D' to='ilya@aiderss.com/0EDD826C' xmlns='jabber:client'> # <show>away</show> # <priority>0</priority> # <x xmlns='http://www.apple.com/xmpp/idle'> # <idle-since>2009-04-01T21:48:15Z</idle-since> Client Idle… # </x> # </presence> client.add_message_callback do |m| puts quot;#{m.from} -- #{m.body}quot; end # > daniel@aiderss.com -- Hey! XMPP4R (Ruby) Demo Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 51. client.send(Jabber::Presence.new.set_type(:available)) # <presence from='daniel@aiderss.com/iMac8D2CB97D' to='ilya@aiderss.com/0EDD826C' xmlns='jabber:client'> # <show>away</show> # <priority>0</priority> # <x xmlns='http://www.apple.com/xmpp/idle'> # <idle-since>2009-04-01T21:48:15Z</idle-since> Client Idle… # </x> # </presence> client.add_message_callback do |m| puts quot;#{m.from} -- #{m.body}quot; end # > daniel@aiderss.com -- Hey! XMPP4R (Ruby) Demo Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 52. One-to-many distribution Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 53. XEP-0060: Publish-Subscribe (Pubsub) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 54. Many wasteful checks Data? No Data? No Data? Yes HTTP / SMTP Polling: painful, wasteful Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 55. Persistent connection Subscribe New message! Publish-Subscribe Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 56. <iq type='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit' id='pub1'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='princely_musings'> IQ Stanza <item> <entry xmlns='http://www.w3.org/2005/Atom'> <title>Soliloquy<title> <summary> To be, or not to be: that is the question! <summary> <link rel='alternate' type='text/html' href='http://denmark.lit/2003/12/13/atom03'/> <id>tag:denmark.lit,2003:entry-32397</id> <published>2003-12-13T18:30:02Z</published> <updated>2003-12-13T18:30:02Z</updated> </entry> </item> </publish> PubSub Protocol: Client XML </pubsub> </iq> Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 57. <iq type='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit' id='pub1'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='princely_musings'> <item> <entry xmlns='http://www.w3.org/2005/Atom'> <title>Soliloquy<title> <summary> To be, or not to be: that is the question! <summary> <link rel='alternate' type='text/html' AtomPub href='http://denmark.lit/2003/12/13/atom03'/> <id>tag:denmark.lit,2003:entry-32397</id> <published>2003-12-13T18:30:02Z</published> <updated>2003-12-13T18:30:02Z</updated> </entry> </item> </publish> PubSub Protocol: Client XML </pubsub> </iq> Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 58. Distribute Publish XEP-0060: Publish-Subscribe (Pubsub) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 59. <message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='princely_musings'> <item id='ae890ac52d0df67ed7cfdf51b644e901'> [ ... ENTRY ... ] Subscriber A </item> </items> </event> </message> <message from='pubsub.shakespeare.lit' to='bernardo@denmark.lit' id='bar'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='princely_musings'> <item id='ae890ac52d0df67ed7cfdf51b644e901'> Subscriber B [ ... ENTRY ... ] </item> </items> </event> </message> XEP-0060: Publish-Subscribe (Pubsub) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 60. Seems neat, but so what? Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 61. XMPP XMPP Real-time communication Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 62. XMPP XMPP XMPP Real-time communication Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 63. Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 64. require 'fire_hydrant' require 'yaml' hydrant = FireHydrant.new(YAML.load(File.read(quot;config.ymlquot;))) hydrant.on_location_update do |user| puts quot;#{user.token} has moved to #{user.locations.first}.quot; Push notifications end hydrant.run! Ruby + FireEagle via XMPP Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 65. Presence: available GET /purchase OK Elastic Computing + Presence Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 66. Ejabberd Erlang Defacto XMPP server Djabberd Perl OpenFire Java RPM, GUI, shiny Tigase Java XMPP / Jabber Servers Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 67. Advanced Message Queuing Protocol (AMQP) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 68. “AMQP is an open Internet Protocol for Business Messaging” AMQP Working Group (16 companies) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 69. Consumer AMQP Broker Publisher AMQP Architecture Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 70. Broker Clustering AMQP Clustering Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 71. Routing key: usd.stock.amz Message: I like AMZ! Direct Topic Fanout Exchange Exchange Exchange AMQP Broker Internals Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 72. Routing key: usd.stock.amz Message: I like AMZ! Direct Topic Fanout Exchange Exchange Exchange Name: amazon Queue Bind: usd.stock.amz AMQP Direct Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 73. Routing key: usd.stock.amz Message: I like AMZ! Direct Topic Fanout Exchange Exchange Exchange Queue Queue Message: I like AMZ! AMQP Direct Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 74. Routing key: usd.stock.msft Message: I like Microsoft! Direct Topic Fanout Exchange Exchange Exchange Name: stocks Queue Bind: usd.stock.* AMQP Topic Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 75. Routing key: usd.stock.msft Message: I like Microsoft! Direct Topic Fanout Exchange Exchange Exchange Queue Message: I like Microsoft! AMQP Topic Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 76. Routing key: usd.stock.msft Message: I like Microsoft! Direct Topic Fanout Exchange Exchange Exchange Queue Queue Name: stocks 1 2 Bind: “” AMQP Fanout Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 77. Routing key: usd.stock.msft Message: I like Microsoft! Direct Topic Fanout Exchange Exchange Exchange Queue Queue Message: I like Microsoft 1 2 AMQP Fanout Exchange Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 78. AMQP Kung-fu: Load-balancing Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 79. Routing key: usd.stock.amz Message: I like AMZ! Direct Topic Fanout Exchange Exchange Exchange Queue Only one client gets the message! AMQP Load Balancing Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 80. Bind: purchase.pdf GET /purchase OK Elastic AMQP Load-balancing Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 81. AMQP Kung-fu: Persistence & Durability Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 82. Routing key: usd.stock.amz Message: I like AMZ! Direct Topic Fanout Exchange Exchange Exchange Durable: True Queue Persistent: True AMQP Persistence & Durability Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 83. Almost there :) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 84. require 'mq' AMQP.start(:host => 'amqp-server.com') do Publisher mq = MQ.new mq.topic('stocks').publish(quot;5.95quot;, :key => quot;usd.amzquot;) end AMQP.start(:host => 'amqp-server.com') do mq = MQ.new mq.queue('amazon stock').bind(mq.topic('stocks'), :key => 'usd.amz').subscribe{ |price| print 'apple stock', price } end AMQP + Ruby Example Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 85. require 'mq' AMQP.start(:host => 'amqp-server.com') do mq = MQ.new mq.topic('stocks').publish(quot;5.95quot;, :key => quot;usd.amzquot;) end Consumer AMQP.start(:host => 'amqp-server.com') do mq = MQ.new mq.queue('amazon stock').bind(mq.topic('stocks'), :key => 'usd.amz').subscribe{ |price| print ‘amazon stock', price } end AMQP + Ruby Example Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 86. Elastic, Event-Driven, <Real-time>, Staged, Services Oriented Architecture (oi…) Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 87. XMPP / AMQP Publisher Elastic Architecture Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 88. XMPP / AMQP Subscribe Exposing Publish-Subscribe API Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda
  • 89. Thanks. Questions & The slides… My blog Comments Event-Driven Architectures http://bit.ly/eda-mesh @igrigorik #meshu #eda