Comet: an Overview and a New Solution Called Jabbify

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Comet: an Overview and a New Solution Called Jabbify - Presentation Transcript

    1. Comet Overview Brian Moschel Jupiter IT
    2. Overview Why Comet How It Showcase Jabbify Demo Comet? Overview Works
    3. Why Comet? • Web 2.0 Trends 1. Time Spent on a Page
    4. Why Comet? • Web 2.0 Trends 2. Half life of a Page’s Content
    5. Why Comet? • Demand for Comet is growing • Desktop apps moving to the web • Chat • Real time updates • Don’t like to reload • Ajax:2003::Comet:2009
    6. Uses • Multi user collaboration apps – Wiki – Presentation • Communication – Chat • Preventing stale data – Stock ticker – Social web updates • Others?
    7. Polling vs. Comet Polling Server Are we Are we Are we No No No There yet? There yet? There yet? Client Comet Long Polling Server Wait for data Wait for data Client
    8. How Comet Works: Client Side • Long Poll – How? • XHR, JSONP, or any transport, with connection held open – Pro • It works cross browser – Con • More overhead • Forever Frame – How? • Iframe • Multipart XHR – Pro • Less overhead, quicker responses – Con • Lack of error handling, not cross browser
    9. Client Side Issues • Cross Browser – Duh • 2 Connection Limit – Use wildcard DNS – Xxx.mywebsite.com -> mywebsite.com • Synchronous request s (for JSONP) – Long poll has to close to allow other requests to process
    10. How Comet Works: Server Side • Simultaneous connections – Traditional servers can’t scale – A thread shared multiple connections • Wake up when you’re ready to send data
    11. How Comet Works: Server Side • Python – Orbited – Cometd • Java – Jetty • Erlang – ErlyComet • .NET – Lightstreamer • Service – Jabbify
    12. Server Side Issues • Scaling – Every user = 1 connection • Complexity – Threading – Learning Curve
    13. What is Jabbify? • Comet, simplified • No server • No setup • JavaScript API and GET requests
    14. Why Jabbify? Simple to use Scale easily Rapid setup
    15. Simple to use synchronized (_continuations) { for(Iterator<Map.Entry <String, ArrayList<Continuation>>> iter = _continuations.entrySet().iterator(); iter.hasNext();){ Map.Entry<String, ArrayList<Continuation>> entry = iter.next(); ArrayList<Continuation> continuations = entry.getValue(); for(Continuation c : continuations){ c.resume(); } } _continuations.clear(); } vs Jabbify.connect({name: this.username}, this.continue_to('after_connect')) after_connect: function(){ Jabbify.send('vote','submit', {result: this.result}) }
    16. Scale easily • Scaling comet >> Scaling traditional web applications • Resource intensive • Jabbify is built to scale as usage grows
    17. Rapid Setup <New id=\"cf\" class=\"org.mortbay.jetty.plus.naming.Resource\"> <Arg>jms/connectionFactory</Arg> <Arg> <New class=\"org.apache.activemq.ActiveMQConnectionFactory\"> <Arg>failover:(tcp://localhost:61616)?initialReconnectDelay=20&amp;maxReconnectDe lay=900</Arg> </New> </Arg> </New> vs <script language=\"javascript\" type=\"text/javascript\" src=\"jabbify.js\"></script>
    18. Comet is complex • Client – Transports (JSONP, Window.name, Flash, XHR, iframe) • Server – Special server – Setup time – Learning curve • Scaling – Resource consumption – Threading issues
    19. Jabbify is simple • Client to Client Comet – JavaScript API • Jabbify.send(“message”,”create”,{message: “hi there”}); • Server to Client Comet – GET requests • https://jabbify.com/message_push?key=123&type=message...
    20. How It Works
    21. Demo
    22. Take Home Points Comet is coming Jabbify = easy Comet
    23. Showcase • Jabbify Simple Chat Client • Keyboard Demo • Chat.unwrongest.com

    + moschelmoschel, 6 months ago

    custom

    499 views, 0 favs, 2 embeds more stats

    Brian Moschel delivered this talk at the JS.Chi() A more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 499
      • 488 on SlideShare
      • 11 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 6
    Most viewed embeds
    • 10 views on http://javascriptchicago.com
    • 1 views on http://javascriptmeetup.com

    more

    All embeds
    • 10 views on http://javascriptchicago.com
    • 1 views on http://javascriptmeetup.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories