Home

Keebler/Blog

« Liveblogging “Event-Driven Arc…
LIVEBLOG: Experiments on selli… »

Event-Driven Architectures

  • 10:08 AM Jonathan Keebler - Just waiting to get underway here at meshU! All the cool kids are in the Development sessions ;) So far, no speaker…
  • 10:11 AM Jonathan Keebler - OH: Ilya is stuck in traffic on his way from Waterloo and isn’t here yet. ScribbleLive might have to step-in and talk about event-driven architecture. Maybe I’ll put on my hat
  • 10:13 AM tforster - Sitting in dev stream #meshu waiting to discuss event driven arch
  • 10:15 AM Keebler (Flickr) -
  • 10:17 AM Jonathan Keebler - The room next door with the 37Signals guys is packed. Standing room only mesh.scribblelive.com
  • 10:19 AM Jonathan Keebler - Ilya will be here in 5 minutes in a “zen-like mode”
  • 10:19 AM Jonathan Keebler - He has arrived! Applause for the man who battled the QEW
  • 10:19 AM CBrooker - At work through the snow. Wish I was at #meshU
  • 10:22 AM Jonathan Keebler - Ilya is the CTO at AideRSS en.wikipedia.org
  • 10:22 AM Jonathan Keebler - They measure user-engagement at PageRank www.postrank.com
  • 10:23 AM Jonathan Keebler - Their dbs have ~1 billion records
  • 10:24 AM Jonathan Keebler - He’s really building this up as a very meaty topic. Asked for a show of hands and most ppl here are Developers. The geek percentage in this room is at an alltime high
  • 10:25 AM Keebler (Flickr) -
  • 10:26 AM Jonathan Keebler - Going over “simple” request/response model. Worst-case for processing requests: serial. Response time is everything. 250ms is a good number for response times. <250ms feels instantaneous, >250 feels like a lifetime.
  • 10:27 AM Jonathan Keebler - Google example: adding 10% search results added 200ms. Feel slower for users.
  • 10:28 AM Jonathan Keebler - In request/response model, web-servers are the bottleneck.
  • 10:29 AM Jonathan Keebler - Myth: Slow frameworks e.g. “Rails, Django can’t scale.” Not actually true. Most of time spent outside of frameworks e.g. database. Most frameworks are “fast enough” e.g. if Google switched framework to be 2x as fast, wouldn’t get them that much.
  • 10:30 AM Jonathan Keebler - Request, Response assembly:
    1. Process request
    2. Authenticate user
    3. Contact db and other services
    4. Render response
    e.g. total 155ms, 0.5MB/conn OR 6.5 req/s
  • 10:31 AM Jonathan Keebler - The Proxy Solution: one common solution to this problem. Add more app servers and hide them behind a proxy server. e.g. for Facebook: just add more web servers and add more proxy servers
  • 10:33 AM Jonathan Keebler - “This is madness (after a certain point)” Throughput != Response Time. Adding proxy servers adds throughput, but increases response time. You can serve a lot of clients slowly
  • 10:35 AM Jonathan Keebler - Event-Driven Architectures: goes back to auto maufacturing circa 1910, 2-3 men, 1-2 days/car. Process = proxy pattern. Sales guy is the proxy server.
  • 10:36 AM Jonathan Keebler - Henry Ford came along with the assembly line. Gave us: queuing theory, lean manufacturing, just in time. Cut down response time to 93 seconds/car, 1M+ cars/year
  • 10:36 AM kurtgooden - Hearing about event driven archit. at #meshu09, optimal user experience is <250ms respnse, architecture over frameworks to optimize #meshu09
  • 10:37 AM Jonathan Keebler - Event Driven Architecture (EDA) = assembly line.
  • 10:37 AM Jonathan Keebler - Example: Monolith Order Processing. Receive, verify, save, PDF, email, render. PDF and email can be done later (doesn’t have to be part of main process). Doing so will give ~70 %improvement in response time. Use Assembly Line Order Processing
  • 10:40 AM Jonathan Keebler - Event-Driven Staged Architecture (SEDA): “Don’t keep the client waiting! Can I defer it?”
  • 10:41 AM Jonathan Keebler - Services Oriented Architecture (SOA): helps you maintain your sanity. Separate logical pieces of code in separate services = makes those pieces more simple.
  • 10:42 AM Jonathan Keebler - SOA: Simple(r) Scalability. Can scale a single service
  • 10:42 AM Jonathan Keebler - Elastic Computing (EC2 & Virtualization). PostRank is fully virtualized on EC2 from the beginning
  • 10:43 AM Jonathan Keebler - Elastic Computing (Pay by the sip). Setup costs for new servers is nothing. You don’t pay for servers when you don’t need them.
  • 10:43 AM Jonathan Keebler - 100 computers * 1 hour = 1 computer * 100 hours
  • 10:44 AM Jonathan Keebler - Era of Parallelism: Moore’s law stop working for us in 2004-2005. Manufacturers can’t put more power on the CPU, moved to parallel computing.
  • 10:46 AM Jonathan Keebler - Thought experiment: what would elastic car manufacturing look like? Can’t really because you are stuck in the physical world. Can’t fire ppl on-demand, or shut down plants
  • 10:46 AM Jonathan Keebler - Elastic Computing = Assembly Line 2.0
  • 10:46 AM Jonathan Keebler - Elastic, Event-Driven, Stages, Services Oriented Architecture: took some of the work out of a web-server and pushed it to service layer (abstracted behind an API).
  • 10:47 AM Jonathan Keebler - Hard to builds apps that can support millions of users with really fast response time. For Google, each request hits 1,000 computers; keeps entire web in memory.
  • 10:49 AM Jonathan Keebler - Real-time communication (between services): key component. Emerging standards: XMPP and AMQP
  • 10:49 AM Jonathan Keebler - XMPP: Extensible Messaging and Presence Protocol. Started as open-source project by Jabber for chat. Very similar to SMTP but done in real-time. XMPP has persistent connections, used by event-stream protocol = knows state of each person connected to that server (i.e. presence)
  • 10:52 AM Jonathan Keebler - Jabber ID concept: ilya@aiderss.com/office = [USER]@[DOMAIN]/[RESOURCE]
  • 10:53 AM Jonathan Keebler - Uses XML for messages: easy to read, very verbose
  • 10:54 AM Jonathan Keebler - Google Talk www.google.com = example of XMPP servers
  • 10:54 AM Jonathan Keebler - Great tool for playing with XMPP: Psi client psi-im.org
  • 10:55 AM Jonathan Keebler - There are XMPP libraries for pretty-much language. Showing example in Ruby
  • 10:56 AM speedygot7 - listening to event-driven architectures at #meshU09 all this talk on XMPP is bringing me back …
  • 10:58 AM Jonathan Keebler - One-to-many distribution: when you change your status (presense) the servers are responsible for telling others
  • 10:58 AM Jonathan Keebler - Publish-Subscribe (Pubsub) = 1-to-many communication through XMPP server
  • 11:00 AM Jonathan Keebler - Twitter problem: HTTP/SMTP polling: painful, wasteful. e.g. New data? No. Data? No. Data? No. = many wasteful checks
  • 11:00 AM Jonathan Keebler - In Publish-Subscribe, user keep persistence connection and asks to be notified when there is new data.
  • 11:02 AM Jonathan Keebler - AtomPub = RSS over XMPP. Sends RSS item nodes into XMPP and it’s sent to everybody from there.
  • 11:03 AM Jonathan Keebler - Ex. Fire Eagle by Yahoo fireeagle.yahoo.net They provide security layer around location updates. Service = intermediate glue. Provide XMPP API. Can send updates about location from applications eg. mobile photos. Brightkite uses Fire Eagle.
  • 11:05 AM Jonathan Keebler - Twitter did have an XMPP API but shut it down for business reasons.
  • 11:05 AM Jonathan Keebler - Use presence to scale services in the cloud. If server drops offline or is busy, route work somewhere else.
  • 11:06 AM Jonathan Keebler - XMPP/Jabber Server examples: Ejabberd, Djabberd, OpenFire (recommended for playing) www.igniterealtime.org, Tigase.
  • 11:08 AM Jonathan Keebler - AMQP: open Internet Protocol for Business Messaging. AMQP Working Group of 16 companies e.g. MS, redhat, Cisco, Goldman Sachs, JPMorganChase
  • 11:08 AM Jonathan Keebler - AMQP architecture: #1 concern is speed e.g. some servers write messages in 10nanoseconds. Use a broker. Broker clustering = connect multiple servers into what seems be to be one service layer.
  • 11:09 AM Jonathan Keebler - AMQP (vs. XMPP): much more flexibility. At core: concept of exchanges: Direct Exchange, Topic Exchange, Fanout Exchange.
  • 11:12 AM Jonathan Keebler - Direct Exchange: create queue to subscribe to same routing key. e.g. usd.stock.msft
    Topic Exchange: use prefix matching/regex matching on routing key e.g usd.stock.*
    Fanout Exchange: simpliest/powerful. No routing keys. Send all msgs to all queues that are attached to it.
  • 11:12 AM Jonathan Keebler - With AMQP, get “free” load-balancing. If clients use same Queue name, they will share the same Queue = really powerful concept.
  • 11:15 AM Jonathan Keebler - Can declare Queues to be “durable” so they exist when no clients are connected. Persistence: msgs will pile up if you’re not connected and you’ll get them when you connect again.
  • 11:18 AM Jonathan Keebler - AMQP + Ruby example (I’m not fast enough to transcript the code off Powerpoint ;) )
  • 11:20 AM Jonathan Keebler - XMPP: great for just sending messages. For load-balancing, AMQP
  • 11:21 AM Jonathan Keebler - Exposing Publish-Subscribe API: easy for both
  • 11:21 AM Jonathan Keebler - QUESTIONS
  • 11:22 AM Jonathan Keebler - Does Amazon have a service like this? No real-time; you have to poll it. No guarantees how fast a message will get routed
  • 11:23 AM Jonathan Keebler - PostRank: uses AMQP (tried XMPP – seemed like natural fit but didn’t offer enough routing capabilities)
  • 11:23 AM Jonathan Keebler - END/APPLAUSE

Powered by ScribbleLive

Related Posts

  • Liveblogging “Event-Driven Arc…
  • Another Apple Event Sends Traffic Soaring on ScribbleLive
  • Comment from Email to any Live Event

This entry was posted on Monday, April 6th, 2009 at 10:32 am and is filed under On-the-Road. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.

  • Blog Home

  • Tags

    90210 alessandra ambrosio animals asp.net audrina patridge battlestar galactica bikini bunny bush C# canada canada election ctv ctvglobemedia development Election Entertainment/Celebrity facebook Gordon Ramsay gorilla gossip girl hayden panettiere iphone last.fm liveblog liveblogging mesh08 muchmusic Music obama palin rachel bilson scribblelive shenae grimes subway telemarketers the hills the killers the office toronto ttc toronto tv us election video yeah yeah yeahs

    WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

  • Recent Posts

    • Got tickets for USA vs. Switze…
    • On my way to YYZ to fly to the…
    • RT @scribblelive: Financial Po…
    • In Olympic Skelton, Canadian M…
    • Hoping people keep putting pre…
  • Categories

    • Election
    • Entertainment/Celebrity
    • Fake News
    • Featured
    • Funny
    • Keebler/Show
    • Music
    • My Releases
    • On-the-Road
    • RedDot
    • Reviews
    • Science/Technology
    • ScribbleLive
    • Security
    • Software
    • Torrent Live Stats
    • Tweets
    • Uncategorized
    • Web Development
  • Blogroll

    • Kitten-Monkey’s Cell
    • :: kattekylling ::
    • Adam Finley
    • blog-j
    • fuzzz.gaulin.ca
    • Idiot Banter
    • mad.greyarea.com
    • ob.blog
    • PollyPrissyPants
    • RedDot CMS Users Google Group
    • ScribbleLive Official Blog
  • My Sites

    • Flickr2Facebook
    • RedDot CMS
    • ScribbleLive
    • Where are my f(acebook)ing friends?
    • WhyYouShould