Comet (programming): Difference between revisions

Content deleted Content added
Undid revision 1002146766 by Yappy2bhere (talk) Point out that the website this article was written to promote now is dead
Cewbot (talk | contribs)
m Fix broken anchor: 2008-09-21T21:30:00Z (VERY DIFFERENT 38>29) #How the Web works⇝World Wide Web#Function
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 | access-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 worksFunction|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 123:
 
==Implementations==
Comet applications attempt to eliminate the limitations of the [[World Wide Web#How the Web worksFunction|page-by-page web model]] and traditional [[polling (computer science)|polling]] by offering two-way sustained interaction, using a persistent or long-lasting HTTP connection between the server and the client. Since browsers and proxies are not designed with server events in mind, several techniques to achieve this have been developed, each with different benefits and drawbacks. The biggest hurdle is the [[Hypertext Transfer Protocol|HTTP]] 1.1 specification, which states "this specification... encourages clients to be conservative when opening multiple connections".<ref>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing, [http://tools.ietf.org/html/rfc7230#section-6.4 section 6.4]. IETF. Retrieved 2014-07-29</ref> Therefore, holding one connection open for real-time events has a negative impact on browser usability: the browser may be blocked from sending a new request while waiting for the results of a previous request, e.g., a series of images. This can be worked around by creating a distinct [[hostname]] for real-time information, which is an alias for the same physical server. This strategy is an application of ___domain sharding.
 
Specific methods of implementing Comet fall into two major categories: streaming and [[long polling]].