ShortBus HTTP based event system
What  is  ShortBus <ul><li>Perlbal plugin (reproxy service) </li></ul><ul><li>Suite of libraries </li></ul><ul><ul><li>Jav...
Perlbal Plugin <ul><li>Runs as a perlbal proxy service </li></ul><ul><li>Browser connects to shortbus without user interac...
JavasScript Library <ul><li>Continuous IFrame </li></ul><ul><ul><li>Firefox </li></ul></ul><ul><ul><ul><li>Loading Icon pr...
Perl Modules <ul><li>ShortBus </li></ul><ul><ul><li>Contains Perlbal plugin, utils  </li></ul></ul><ul><ul><li>Will contai...
Connection Process <ul><li>Browser connects to Perlbal </li></ul><ul><ul><li>http://[ random].example.com/shortbus </li></...
Benefits of ShortBus <ul><li>Normal authorization techniques can be used </li></ul><ul><ul><li>Basic, Digest, etc </li></u...
Client Posts <ul><li>Client sends POST data </li></ul><ul><li>Web server processes it normally </li></ul><ul><li>Can ack e...
Potential Uses <ul><li>Live chat </li></ul><ul><li>Stock ticker </li></ul><ul><li>Live website updates </li></ul><ul><ul><...
 
Upcoming SlideShare
Loading in...5
×

Cometd / ShortBus Slide Presentation

1,100

Published on

Cometd / ShortBus Slide Presentation (PowerPoint)

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

  • Be the first to like this

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

No notes for slide

Cometd / ShortBus Slide Presentation

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

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

×