Your SlideShare is downloading. ×
  • Like
Cometd / ShortBus Slide Presentation
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Cometd / ShortBus Slide Presentation


Cometd / ShortBus Slide Presentation (PowerPoint)

Cometd / ShortBus Slide Presentation (PowerPoint)

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    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. ShortBus HTTP based event system
  • 2. What is ShortBus
    • Perlbal plugin (reproxy service)
    • Suite of libraries
      • JavaScript
      • Perl
    • ShortBus is funny name for a serious project
  • 3. Perlbal Plugin
    • Runs as a perlbal proxy service
    • Browser connects to shortbus without user interaction
    • Long lived connections
    • 1 minute event queue with lazy acknowledgments. (configurable)
    • Event replay (starting at an event id)
  • 4. JavasScript Library
    • Continuous IFrame
      • Firefox
        • Loading Icon problem (may use xmlhttp instead)
      • IE
        • Htmlfile trick
          • htmlfile object with iframe inside
          • Gets around IE *click*
    • Xmlhttp
      • Firefox, IE, Others
        • Needs to be reused more often to avoid using large amounts of memory
  • 5. Perl Modules
    • ShortBus
      • Contains Perlbal plugin, utils
      • Will contain examples
        • Chat server
        • Web server
        • Client monitor
  • 6. Connection Process
    • Browser connects to Perlbal
      • http://[ random]
    • Perlbal requests /shortbus from web server
    • Web server script authorizes request by sending 2 headers:
      • X-REPROXY-SERVICE: shortbus
      • X-SHORTBUS: ID=55B4C1EC-DBBC-11DA-8F28-BEE8F8B0946C; action=bind; channels=foo,bar;
    • Web server stores Perlbal server and client ID for future use
    • Perlbal redirects request to shortbus plugin, and events start streaming
  • 7. Benefits of ShortBus
    • Normal authorization techniques can be used
      • Basic, Digest, etc
      • Cookie based
    • Cookies can be processed normally
    • The web server authorizes each client connection to enter the event system
    • Perlbal can handle the large amount of open connections
    • Uses standard JSON
      • Pluggable
        • Atom, YAML, etc
  • 8. Client Posts
    • Client sends POST data
    • Web server processes it normally
    • Can ack events by returning 2 headers:
      • X-REPROXY-SERVICE: shortbus
      • X-SHORTBUS: ID=55B4C1EC-DBBC-11DA-8F28-BEE8F8B0946C; action=ack; eid=<event id>
    • Shortbus returns data normally (does not enter event loop)
    • Transparent to the client
  • 9. Potential Uses
    • Live chat
    • Stock ticker
    • Live website updates
      • Same user, two browsers
      • (Delete asset on one, dissapears on the other)
    • Games
      • Card games (Texas Hold’em  )
      • Ajax MMORPG! (VRML anyone?)
  • 10.