Topics


Blogs


Forums


Samples


Media


Labs


Resources

 




DevCentral > Weblogs > Lori MacVittie - Two Different Socks
 Facepalm: Google Wave Choice of XMPP Not the Death of HTTP
posted on Tuesday, June 02, 2009 3:47 AM

Google didn’t kill HTTP. Neither did Colonel Mustard or Professor Plum. In fact, HTTP is still very much alive.

Not-again-picard Okay, folks, it’s time to stop declaring the death of protocols/technologies prematurely. Please? Especially when such proclamations are clearly not representative of reality.

From ElasticVapor :: Life in the Cloud
In Google's announcement what I found most fascinating was the protocol they choose for the basis of their new realtime vision. It wasn't
HTTP but instead XMPP was selected as the foundation for this decentralized and interoperable vision. What this means in very simple terms is Google has declared the HTTP protocol is dead, an inefficient relic of the past. A protocol that was never designed with the requirements for the reality of a global realtime cloud. [emphasis added]

If you dig into the Google WAVE Embed API code far enough, you’ll get to a core RPC/gadget library that clearly indicates the API is still taking advantage of HTTP. It’s using XMLHttpRequest as expected and handles all the ugliness of setting up and handling the calls. Following is some code from the init function, but there are plenty of other places where HTTP requests are made and callbacks subsequently called, indicating Google is making full use of HTTP as a transport protocol for XMPP in order, one assumes, to support the browser as a client. The fact that Google offers an “Embed API” for browsers and touts the ease with which waves can be integrated into web sites and pages indicates broad support for HTTP without digging into the code, but it’s always nice to dig in and verify that something new and exciting isn’t happening “under the covers.”

function init(configuration){config=configuration["core.io"]||{}
var httpMethod=params.METHOD||"GET";
if(params.AUTHORIZATION&¶ms.AUTHORIZATION!=="NONE"){auth=params.AUTHORIZATION.toLowerCase();
st=shindig.auth.getSecurityToken()
}else{if(httpMethod==="GET"&&refreshInterval===undefined){refreshInterval=3600

Code snippets have been extracted to show use of HTTP and is not the full code. My apologies for the formatting, but that’s the way it came out of the source file. And if you’re a stickler for meaningful variable names, do not go digging around in this one because it will make your head explode. Really. 

Given Google’s extensive support for gadgets/widgets/whatever intended for use within websites then it only makes sense that they’d still be using HTTP because XMPP, while a great protocol, isn’t natively supported by any browser at this time. So Google has to have some way to duh_canensure that browsers – the primary mechanism for communicating with services over the Internet today – could take advantage of its latest and greatest.

Google has obviously chosen XMPP for its application layer data exchange because it’s open, extensible, or maybe that’s just where the dart  landed when they discussed their options. But let’s face facts: HTTP is the de facto application layer transport protocol of the Internet and it’s highly unlikely that a company that’s built its fortunes upon that fact is suddenly going to turn around and abandon it. HTTP is the only almost-surefire method of traversing firewalls in any kind of bi-directional communication exchange between clients and servers, and routinely carries on its back any number of “layer 7+” protocols such as SOAP, JSON, and XML.

While XMPP can – and is – implemented directly atop TCP (and is in fact designed to be so) it often makes use of  HTTP for many of its core XML dependencies, such as the definition of namespaces and relevant schemas.

The browser is not going away and, in fact, seems to be gaining more and more support as the de facto client platform of the Internet and, by extension, “the cloud.” It is highly unlikely, then, that any provider of software – cloud or not – would even attempt to kill HTTP in favor of some other transport layer protocol.

The chance that Google, whose fame and fortune has been made piggybacked on HTTP and its use, would knowingly and willingly kill HTTP in its choices is even more unlikely.

Follow me on Twitter View Lori's profile on SlideShare friendfeedicon_facebook AddThis Feed Button Bookmark and Share

Related blogs & articles:



 
      

Feedback


6/2/2009 5:33 AM
Gravatar To clarify, XMPP does not at all rely on HTTP. Indeed, namespaces are URIs, and some of them in use the http schema, but there is no requirement to dereference them. XMPP XML schemas are non-normative and also there is no relience on HTTP here either.
Ralph Meijer

6/2/2009 7:13 AM
Gravatar @Ralph

Thanks for the clarification - I was trying hard not to imply that there is a reliance, just that such protocols often do end up relying on HTTP for such things because it's the simplest method of doing so over the Internet without distribution of files/concerns over support for additional protocols/access/etc...

XMPP does not rely on HTTP, but it often uses - as do other XML-based protocols - HTTP for namespaces and schemas.

Google's use of HTTP is to provide support via the browser for XMPP as the browser is currently incapable of native support for straight TCP-transported protocols.

Thanks!
Lori
Lori MacVittie

6/2/2009 8:43 AM
Gravatar This article misses the point of XMPP usage in Wave--it's for server-to-server communication, while HTTP is still fully employed for the usual server-to-client communication.

There's no competition there.
Chris Ryland

6/2/2009 12:11 PM
Gravatar XMPP == Jabber == Google Talk. This was an easy choice for Google, and a smart one. XMPP clients are already well understood, and putting this Wave interface on top of the Jabber protocol is a no-brainer.
Lee Teague

6/3/2009 11:10 AM
Gravatar XMPP is essentially a message routing protocol - perfect for what wave does under the hood in communicating server to server but not traditionally a carrier for the Interface - what the human being sees, which is what that code seems to be about. So in that respect there is nothing to see here.

On the other hand, HTTP is a dated protocol and it deserves to be the subject of replacement. Multi-homed, non-blocking, asynchronous transport protocols are really what is required to "take the next step" and TCP/HTTP isn't capable of providing what, for example, SCTP/BEEP, offers for delivering application data to consumers who are tending to be hungry for rich content at high speed and are equipped with more powerful mobile internet devices.

Wave is the Model-T of the kind of applications that will require such a transport/application protocol pairing.
Ian

8/15/2009 9:08 AM
Gravatar XMPP not on HTTP
will

8/15/2009 11:14 AM
Gravatar @will

The XMPP specification allows for transport via HTTP. That said, it is usually not, but the adoption of XMPP is not the "death knell" for HTTP. In fact, I would predict that Google will end up transporting via HTTP, as it is HTTP that is the de facto transport protocol for web-based applications and pressure from developers will in fact push them in that direction.

Lori
Lori MacVittie

9/18/2009 10:28 PM
Gravatar so many of our applications bear the burden of decades of old thinking. We need to challenge our assumptions and re-imagine the tools we take for granted. It's perhaps no accident that this project, carried out secretly at Google's Sydney office over the past two years, had the code name Walkabout. That's the Australian aboriginal tradition of going off for an extended period to retrace the songlines and learn the world anew.
Affordable seo

11/14/2009 12:14 PM
Gravatar XMPP not on HTTP
antique-18th-century

11/22/2009 7:30 PM
Gravatar Having XMLHttpRequest means nothing, the Web doesn't support anything other than HTTP (Websockets in HTML5 might change it, but as of now, no browsers actually support WebSockets, I bet that you can expect a transition of Wave's core from the Long-Polling XHR technique to a more efficient WebSocket implementation). Also in Internet Explorer, they have a iframe/activex approach, which is still technically HTTP.

What suprises me slightly is that Wave uses a custom client/server protocol rather than the established BOSH XMPP protocol which is a Bidirectional Streams Over Synchronous HTTP, a standardized way to use XMPP over HTTP.

But after Google Closure was released, I looked into the section on BrowserChannel, which is what they specifically use to abstract the connections. It seems like they're using the existing archetecture for Gmail Chat which they developed a while ago.

From a brief googling, it appears that BOSH just started in early 2008 (or late 2007), while Google Talk has existed since very early 2007.
antimatter15

11/24/2009 5:47 AM
Gravatar Trully, I love the blog and want to see more posts there.
flash programming

12/21/2009 5:38 PM
Gravatar Post is nicely written and it contains many good things for me. I am glad to find your impressive way of writing the post. Now it become easy for me to understand and implement the concept. Thanks for sharing the post.
discount sunglasses

1/10/2010 7:56 PM
Gravatar Thanks for the excellent wrap-up.
Website SEO

1/11/2010 2:47 AM
Gravatar Thanks for the nice feedback everyone, I really appreciate it!

SEO Firm
jim garry

1/27/2010 8:09 AM
Gravatar To build my websites I prefer to use a platform that supports both, honestly. more versatile.
dog Tags for dogs

2/6/2010 12:59 PM
Gravatar Why not http?
antivirus

2/6/2010 1:09 PM
Gravatar I sincerely prefer to build my site with only html , very simple
antivirus

2/8/2010 12:08 AM
Gravatar
Your blog is very nice. I m really impressed .I m waiting for your next post. Hopefully I will get it soon.
Printing

2/9/2010 2:15 AM
Gravatar Google wave is one of the awaited website google is now getting introduced. I habe tested Google wave and find out that its required more changed in it.
Tech Review
 Leave Feedback
Title  
Name  
Email
Url
Comments   
Please add 4 and 7 and type the answer here: