Comet (programming): Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 24 templates: hyphenate params (20×);
Line 1:
'''Comet''' is a [[web application]] model in which a long-held [[HTTPS]] request allows a [[web server]] to [[Push technology|push]] data to a [[web browser|browser]], without the browser explicitly requesting it.<ref name='MASH'>{{cite web | url = http://www.infoworld.com/d/developer-world/ajax-alliance-recognizes-mashups-559 | title = AJAX alliance recognizes mashups | accessdateaccess-date = 2010-10-20 | last = Krill | first = Paul | date = September 24, 2007 | publisher = [[InfoWorld]]}}</ref><ref name="CRANG">{{cite book|title=Comet and Reverse Ajax: The Next-Generation Ajax 2.0|last2=McCarthy|first2=Phil|date=October 13, 2008|publisher=[[Apress]]|isbn=978-1-59059-998-3|last1=Crane|first1=Dave}}<!--| accessdate = 2010-10-20 --></ref> ''Comet'' is an [[umbrella term]], encompassing multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as [[JavaScript]], rather than on non-default plugins. The Comet approach differs from the [[World Wide Web#How the Web works|original model of the web]], in which a browser requests a complete web page at a time.<ref name = "WRC" />
 
The use of Comet techniques in [[web development]] predates the use of the word ''Comet'' as a [[neologism]] for the collective techniques. Comet is known by several other names, including
Line 10:
| ___location = [[JavaOne]] 2007, [[San Francisco, California]]
| url = http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-8434&yr=2007&track=7
| accessdateaccess-date = 2008-06-10
}}</ref><ref name="ice">{{cite web
|url=http://www.icesoft.org/java/projects/ICEfaces/ajax-push.jsf
|title=Ajax Push
|publisher=ICEfaces.org
| accessdateaccess-date = 2014-10-23
}}</ref>
''Reverse Ajax'',<ref>{{cite book
Line 44:
|last = Double
|date = 2005-11-05
|accessdateaccess-date = 2008-05-05
}}
</ref>
Line 54:
|last = Nesbitt
|date = 2005-11-01
|accessdateaccess-date = 2008-05-06
|url-status = dead
|archiveurlarchive-url = https://web.archive.org/web/20060208041559/http://www.obviously.com/tech_tips/slow_load_technique
|archivedatearchive-date = 2006-02-08
}}
</ref> The term ''Comet'' is not an acronym, but was coined by Alex Russell in his 2006 [[blog]] post ''Comet: Low Latency Data for the Browser''.<ref>{{cite web
Line 65:
|last = Russell
|date = 2006-03-04
|accessdateaccess-date = 2014-11-02
}}
</ref>
Line 74:
 
===Early Java applets===
The ability to embed [[Java applet]]s into browsers (starting with [[Netscape Navigator 2]].0 in March 1996<ref>{{cite web |url=http://www27.netscape.com/comprod/products/navigator/version_2.0/index.html |title=Netscape.com |accessdateaccess-date=2017-08-16 |url-status=bot: unknown |archiveurlarchive-url=https://web.archive.org/web/19961115203505/http://www27.netscape.com/comprod/products/navigator/version_2.0/index.html |archivedatearchive-date=November 15, 1996 }}</ref>) made two-way sustained communications possible, using a raw [[Transmission Control Protocol|TCP]] socket<ref>[http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html "java.net.Socket (Java 2 Platform SE v1.4.2)"] {{webarchive |url=https://web.archive.org/web/20090519063251/http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html |date=May 19, 2009 }}</ref> to communicate between the browser and the server. This socket can remain open as long as the browser is at the document hosting the applet. Event notifications can be sent in any format{{snd}} text or binary{{snd}} and decoded by the applet.
 
===The first browser-to-browser communication framework===
Line 86:
| publisher = Northeast Parallel Architecture Center, College of Engineering and Computer Science
| access-date = 27 February 2016
}}</ref>{{failed verification|date=December 2017}} implemented in 1996–98 at the Northeast Parallel Architectures Center ([http://surface.syr.edu/npac/ NPAC]) at [[Syracuse University]] using [[DARPA]] funding. TANGO architecture has been patented by Syracuse University.<ref>{{Citation|last = Podgorny|first = Marek|title = United States Patent: 6078948 - Platform-independent collaboration backbone and framework for forming virtual communities having virtual rooms with collaborative sessions|date = June 20, 2000|url = http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%252Fnetahtml%252FPTO%252Fsearch-bool.html&r=14&f=G&l=50&co1=AND&d=PTXT&s1=Podgorny.INNM.&OS=IN/Podgorny&RS=IN/Podgorny|last2 = Beca|last3 = Cheng|last4 = Fox|last5 = Jurga|last6 = Olszewski|last7 = Sokolowski|last8 = Walczak|last9 = PL|first2 = Lukasz|first3 = Gang|first4 = Geoffrey C.|first5 = Tomasz|first6 = Konrad|first7 = Piotr|first8 = Krzysztof|accessdateaccess-date = 2016-02-27}}</ref> TANGO framework has been extensively used as a distance education tool.<ref>{{Cite web
| url = https://www.dsc.soic.indiana.edu/sites/default/files/tr_9921.pdf
| title = Experiences with Using TANGO Interactive in a Distributed Workshop
Line 105:
|date=2001-04-01
|publisher=[[CNET Networks]]
|accessdateaccess-date=2008-07-22
}}</ref>
 
Line 117:
|date=2006-05-12
|publisher=eWEEK.com
|accessdateaccess-date=2008-07-21
}}</ref><ref>[http://en.oreilly.com/oscon2008/public/schedule/detail/3048 Orbited: Enabling Comet for the Masses: OSCON 2008 - O'Reilly Conferences, July 21 - 25, 2008, Portland, Oregon<!-- Bot generated title -->]</ref><ref>[http://www.web2journal.com/read/457966.htm Enterprise Comet & Web 2.0 Live Presentation<!-- Bot generated title -->] {{webarchive|url=https://web.archive.org/web/20080520222527/http://www.web2journal.com/read/457966.htm |date=2008-05-20 }}</ref>
 
Line 128:
 
===Streaming===
An application using streaming Comet opens a single [[persistent connection]] from the [[Web browser|client browser]] to the server for all Comet [[Event (computing)|events]]. These events are incrementally handled and interpreted on the client side every time the server sends a new event, with neither side closing the connection.<ref name = "WRC">{{cite web | url = http://www.webreference.com/programming/javascript/rg28/ | title = Comet Programming: Using Ajax to Simulate Server Push | accessdateaccess-date = 2010-10-20 | last = Gravelle | first = Rob | publisher = Webreference.com | archive-url = https://web.archive.org/web/20101018055530/http://www.webreference.com/programming/javascript/rg28/ | archive-date = 2010-10-18 | url-status = dead }}</ref>
 
Specific techniques for accomplishing streaming Comet include the following:
Line 179:
Browser-native technologies are inherent in the term Comet. Attempts to improve non-polling HTTP communication have come from multiple sides:
 
* The [[HTML 5]] draft specification produced by the [[Web Hypertext Application Technology Working Group]] (WHATWG) specifies so called [[server-sent events]],<ref name='server-sent-events'>{{cite web|editor=Ian Hickson |date=2007-10-27 |work=HTML 5 - Call For Comments|title=6.2 Server-sent DOM events|url=http://www.whatwg.org/specs/web-apps/2007-10-26/multipage/section-server-sent-events.html#server-sent-events |publisher=[[WHATWG]]|accessdateaccess-date=2008-10-07}}</ref> which defines a new JavaScript interface <code>EventSource</code> and a new MIME type <code>text/event-stream</code>. [[Server-sent_events#Web_browsers|All major browsers except Microsoft Internet Explorer]] include this technology.
* The [[HTML 5]] [[WebSocket]] API working draft specifies a method for creating a persistent connection with a server and receiving messages via an <code>onmessage</code> callback.<ref>
{{cite web
Line 188:
|publisher=[[W3C]]
|date=2009-04-23
|accessdateaccess-date=2009-07-21
}}
</ref>
* The Bayeux protocol by the [[Dojo Foundation]]. It leaves browser-specific transports in place, and defines a higher-level protocol for communication between browser and server, with the aim of allowing re-use of [[client-side JavaScript]] code with multiple Comet servers, and allowing the same Comet server to communicate with multiple client-side JavaScript implementations. Bayeux is based on a publish/subscribe model, so servers supporting Bayeux have publish/subscribe built-in.<ref name="bayeux">{{cite web|author=Alex Russell |year=2007 |url=http://svn.cometd.org/trunk/bayeux/bayeux.html|title=Bayeux Protocol - Bayeux 1.0draft1.| publisher= Dojo Foundation| accessdateaccess-date=2007-12-14|display-authors=etal}}</ref>
* The [[BOSH (protocol)|BOSH]] protocol by the XMPP standards foundation. It emulates a bidirectional stream between browser and server by using two synchronous HTTP connections.
* The JSONRequest object, proposed by [[Douglas Crockford]], would be an alternative to the XHR object.<ref>{{cite web
Line 200:
|work = An alternative to XMLHttpRequest for long lasting server initiated push of data
|date = 2006-04-17
|accessdateaccess-date = 2008-05-05
}}</ref>
* Use of plugins, such as [[Java applet]]s or the proprietary [[Adobe Flash]] (using [[Real-Time Messaging Protocol|RTMP]] protocol for data streaming to Flash applications). These have the advantage of working identically across all browsers with the appropriate plugin installed and need not rely on HTTP connections, but the disadvantage of requiring the plugin to be installed
* [[Google]] announced<ref>App, The. (2010-12-02) [http://googleappengine.blogspot.com/2010/12/happy-holidays-from-app-engine-team-140.html Google App Engine Blog: Happy Holidays from the App Engine team - 1.4.0 SDK released]. Googleappengine.blogspot.com. Retrieved on 2014-04-12.</ref> a new Channel API for [[Google App Engine]],<ref>Paul, Ryan. (2010-12-06) [https://arstechnica.com/web/news/2010/12/app-engine-gets-streaming-api-and-longer-background-tasks.ars App Engine gets Streaming API and longer background tasks]. Ars Technica. Retrieved on 2014-04-12.</ref> implementing a Comet-like API with the help of a client JavaScript library on the browser. This API has been deprecated. <ref>{{cite web |url=https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/channel/package-summary |title=Package com.google.appengine.api.channel |publisher=[[Google]] |date=2019-11-16 |accessdateaccess-date=2020-04-30 |quote=This API has been deprecated. }}</ref>
 
==See also==