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

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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...
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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