Cometd / ShortBus Slide Presentation

  • 1,047 views
Uploaded on

Cometd / ShortBus Slide Presentation (PowerPoint)

Cometd / ShortBus Slide Presentation (PowerPoint)

More 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

Views

Total Views
1,047
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
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.