Kamaelia CrossTalkKamaelia Crosstalk is an open internet
communication protocol for transmitting HTTP information between
computers. Of course, the obvious question here is why not use HTTP to
transmit HTTP data? I'm glad you asked. :)
History If you just want to get to the details of CrossTalk, feel free to skip this section.
When I first proposed Kamaelia Publish, I had intended upon making separate "peer" and "intermediary" programs. The idea being that a person who wanted to pull up a webpage that a peer is hosting can send an HTTP request to the intermediary (which is essentially an HTTP proxy) and the intermediary will then forward the request to the peer. The peer will then send the response to the intermediary. I then came across a protocol known as XMPP, a protocol typically used for instant messenging. Here's an example of how XMPP works from wikipedia:
The idea of XMPP servers sounds an awful lot like my "intermediary" doesn't it? So I took this idea a step further. XMPP has a concept of "gateways" that are intended to convert other protocols into XMPP. That way, if you want to talk to a friend who uses AIM or Yahoo, you can do it. What if it were possible to transmit HTTP via XMPP using a gateway?
The next step was to try sending the text of the HTTP request to the peer, and then the peer would send the response back to the gateway. This turned out to be more complicated than it seems. The problem being that the HTTP request would have to be parsed at the gateway level as well as at the peer level. So why not just send the parsed data from the gateway to the peer? That led to what I am now terming CrossTalk (the name may change later).
Why the name CrossTalk?Because I got tired of referring to Kamaelia's means of transmitting HTTP data as "HTTP over XMPP." That's too much of a mouthful, has too much alphabet soup for laymen, and isn't really accurate anyway.
How does it work?First of all, I should note that CrossTalk is currently purely experimental, and is likely to change.
CrossTalk uses JSON to serialize data to be transmitted from Peer to Gateway (and possibly from Peer to Peer at a later point in time). An operation that starts with an HTTP request from a user and ends with an HTTP response back to that same user is referred to as a transaction. Each transaction begins with a request object. This object contains all of the data that is present in the HTTP request line and headers, formatted in a CGI environment-like dictionary. In addition to the data that is present in the HTTP request dictionary, there are two other keys that may be present.
This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)
(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved