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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

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

Cometd / ShortBus Slide Presentation

1,074
views

Published on

Cometd / ShortBus Slide Presentation (PowerPoint)

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,074
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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].example.com/shortbus
    • 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.