SlideShare a Scribd company logo
1 of 23
Comet Overview

      Brian Moschel
      Jupiter IT
Overview



 Why      Comet               How It          Showcase
                    Jabbify            Demo
Comet?   Overview             Works
Why Comet?
• Web 2.0 Trends
  1. Time Spent on a Page
Why Comet?
• Web 2.0 Trends
  2. Half life of a Page’s Content
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
Uses
• Multi user collaboration apps
   – Wiki
   – Presentation
• Communication
   – Chat
• Preventing stale data
   – Stock ticker
   – Social web updates
• Others?
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
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
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
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
How Comet Works: Server Side
• Python
   – Orbited
   – Cometd
• Java
   – Jetty
• Erlang
   – ErlyComet
• .NET
   – Lightstreamer
• Service
   – Jabbify
Server Side Issues
• Scaling
  – Every user = 1 connection
• Complexity
  – Threading
  – Learning Curve
What is Jabbify?
•   Comet, simplified
•   No server
•   No setup
•   JavaScript API and GET requests
Why Jabbify?

Simple to use

Scale easily

Rapid setup
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})
}
Scale easily
• Scaling comet >> Scaling traditional web
  applications
• Resource intensive
• Jabbify is built to scale as usage grows
Rapid Setup
<New id=quot;cfquot; class=quot;org.mortbay.jetty.plus.naming.Resourcequot;>
  <Arg>jms/connectionFactory</Arg>
  <Arg>
    <New class=quot;org.apache.activemq.ActiveMQConnectionFactoryquot;>

<Arg>failover:(tcp://localhost:61616)?initialReconnectDelay=20&amp;maxReconnectDe
lay=900</Arg>
    </New>
  </Arg>
</New>
                                  vs

<script language=quot;javascriptquot; type=quot;text/javascriptquot; src=quot;jabbify.jsquot;></script>
Comet is complex
• Client
   – Transports (JSONP, Window.name, Flash, XHR, iframe)
• Server
   – Special server
   – Setup time
   – Learning curve
• Scaling
   – Resource consumption
   – Threading issues
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...
How It Works
Demo
Take Home Points

Comet is coming

Jabbify = easy Comet
Showcase
• Jabbify Simple Chat Client
• Keyboard Demo
• Chat.unwrongest.com

More Related Content

What's hot

Measuring the visual experience of website performance
Measuring the visual experience of website performanceMeasuring the visual experience of website performance
Measuring the visual experience of website performance
Patrick Meenan
 

What's hot (20)

Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Speed Matters!
Speed Matters!Speed Matters!
Speed Matters!
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
 
The Case for HTTP/2
The Case for HTTP/2The Case for HTTP/2
The Case for HTTP/2
 
Getting the most out of WebPageTest
Getting the most out of WebPageTestGetting the most out of WebPageTest
Getting the most out of WebPageTest
 
Scaling Front-End Performance - Velocity 2016
Scaling Front-End Performance - Velocity 2016Scaling Front-End Performance - Velocity 2016
Scaling Front-End Performance - Velocity 2016
 
Web Performance Optimization
Web Performance OptimizationWeb Performance Optimization
Web Performance Optimization
 
GTMetrix Report For GPStrackingMart.com
GTMetrix Report For GPStrackingMart.comGTMetrix Report For GPStrackingMart.com
GTMetrix Report For GPStrackingMart.com
 
Measuring the visual experience of website performance
Measuring the visual experience of website performanceMeasuring the visual experience of website performance
Measuring the visual experience of website performance
 
17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About
 
Web Sockets
Web SocketsWeb Sockets
Web Sockets
 
Velocity EU 2012 - Third party scripts and you
Velocity EU 2012 - Third party scripts and youVelocity EU 2012 - Third party scripts and you
Velocity EU 2012 - Third party scripts and you
 
Web Sockets - HTML5
Web Sockets - HTML5Web Sockets - HTML5
Web Sockets - HTML5
 
WebPagetest Power Users - Velocity 2014
WebPagetest Power Users - Velocity 2014WebPagetest Power Users - Velocity 2014
WebPagetest Power Users - Velocity 2014
 
Making the web faster
Making the web fasterMaking the web faster
Making the web faster
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
 
Measuring web performance
Measuring web performanceMeasuring web performance
Measuring web performance
 
RESTful design
RESTful designRESTful design
RESTful design
 
Web Page Test - Beyond the Basics
Web Page Test - Beyond the BasicsWeb Page Test - Beyond the Basics
Web Page Test - Beyond the Basics
 

Similar to Comet: an Overview and a New Solution Called Jabbify

Comet, Simplified, with Jabbify Comet Service
Comet, Simplified, with Jabbify Comet ServiceComet, Simplified, with Jabbify Comet Service
Comet, Simplified, with Jabbify Comet Service
Brian Moschel
 
iPhone Development For Experienced Web Developers
iPhone Development For Experienced Web DevelopersiPhone Development For Experienced Web Developers
iPhone Development For Experienced Web Developers
lisab517
 

Similar to Comet: an Overview and a New Solution Called Jabbify (20)

Comet, Simplified, with Jabbify Comet Service
Comet, Simplified, with Jabbify Comet ServiceComet, Simplified, with Jabbify Comet Service
Comet, Simplified, with Jabbify Comet Service
 
Comet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way MediumComet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way Medium
 
Offline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo OfflineOffline capable web applications with Google Gears and Dojo Offline
Offline capable web applications with Google Gears and Dojo Offline
 
iPhone Development For Experienced Web Developers
iPhone Development For Experienced Web DevelopersiPhone Development For Experienced Web Developers
iPhone Development For Experienced Web Developers
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
PPW2007 - Continuity Project
PPW2007 - Continuity ProjectPPW2007 - Continuity Project
PPW2007 - Continuity Project
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
 
Web 2.0 & Ajax Basics
Web 2.0 & Ajax BasicsWeb 2.0 & Ajax Basics
Web 2.0 & Ajax Basics
 
Grizzly Comet Aquarium Paris
Grizzly Comet Aquarium ParisGrizzly Comet Aquarium Paris
Grizzly Comet Aquarium Paris
 
iPhone & Java Web Services
iPhone & Java Web ServicesiPhone & Java Web Services
iPhone & Java Web Services
 
Comet and the Rise of Highly Interactive Websites
Comet and the Rise of Highly Interactive WebsitesComet and the Rise of Highly Interactive Websites
Comet and the Rise of Highly Interactive Websites
 
Deploying and Scaling using AWS
Deploying and Scaling using AWSDeploying and Scaling using AWS
Deploying and Scaling using AWS
 
Be Afraid. Be Very Afraid. Javascript security, XSS & CSRF
Be Afraid. Be Very Afraid. Javascript security, XSS & CSRFBe Afraid. Be Very Afraid. Javascript security, XSS & CSRF
Be Afraid. Be Very Afraid. Javascript security, XSS & CSRF
 
ICEfaces and JSF 2.0 on GlassFish
ICEfaces and JSF 2.0 on GlassFishICEfaces and JSF 2.0 on GlassFish
ICEfaces and JSF 2.0 on GlassFish
 
The Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With RubyThe Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With Ruby
 
Ajax World West
Ajax World WestAjax World West
Ajax World West
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
 
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
 
Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & Orbited
 
iphone and Java Web Services Take 2
iphone and Java Web Services Take 2iphone and Java Web Services Take 2
iphone and Java Web Services Take 2
 

More from Brian Moschel (11)

A Very Biased Comparison of MVC Libraries
A Very Biased Comparison of MVC LibrariesA Very Biased Comparison of MVC Libraries
A Very Biased Comparison of MVC Libraries
 
FuncUnit
FuncUnitFuncUnit
FuncUnit
 
Bottom Up
Bottom UpBottom Up
Bottom Up
 
Headless Js Testing
Headless Js TestingHeadless Js Testing
Headless Js Testing
 
Web 2.0 Expo Notes
Web 2.0 Expo NotesWeb 2.0 Expo Notes
Web 2.0 Expo Notes
 
Building an App with jQuery and JAXER
Building an App with jQuery and JAXERBuilding an App with jQuery and JAXER
Building an App with jQuery and JAXER
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Ajax3
Ajax3Ajax3
Ajax3
 
Basic inheritance in JavaScript
Basic inheritance in JavaScriptBasic inheritance in JavaScript
Basic inheritance in JavaScript
 
Things to avoid in JavaScript
Things to avoid in JavaScriptThings to avoid in JavaScript
Things to avoid in JavaScript
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Comet: an Overview and a New Solution Called Jabbify

  • 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=quot;cfquot; class=quot;org.mortbay.jetty.plus.naming.Resourcequot;> <Arg>jms/connectionFactory</Arg> <Arg> <New class=quot;org.apache.activemq.ActiveMQConnectionFactoryquot;> <Arg>failover:(tcp://localhost:61616)?initialReconnectDelay=20&amp;maxReconnectDe lay=900</Arg> </New> </Arg> </New> vs <script language=quot;javascriptquot; type=quot;text/javascriptquot; src=quot;jabbify.jsquot;></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...
  • 21. Demo
  • 22. Take Home Points Comet is coming Jabbify = easy Comet
  • 23. Showcase • Jabbify Simple Chat Client • Keyboard Demo • Chat.unwrongest.com