Basically, it allows a client’s browser to keep a connection that remains open with a Reverse AJAX server, allowing information to be piped to the client’s browser. Yes, you may think this isn’t possible, but the way it works is that the Reverse AJAX server tricks the browser into thinking that page is still loading, keeping the HTTPRequest connection open until the browser times it out. Upon timeout, the client software immediately re-opens the connection.
In that way, a continuous connection is kept open as long as the browser is running your client-end software
With Reverse-AJAX, your website can become LIVE, information is piped to it in real-time. If you are running a forum, your forum software can talk to all instances of it, being run by your visitors. This would allow it to send updates (such as new posts, PMs, etc) in real-time. You could in a similar manner run a chat session, where hundreds of instances of your web software could talk in real-time.
My question is, would JodoHost clients and developers in general be interested in a Reverse AJAX service from JodoHost that would allow instances of your web software (a forum, website, chat, etc) to talk to each other in real-time.
With such a service, it would be possible (in the future) to also write server-side scripts for Reverse AJAX, that could pull in real-time information and pipe it to instances of your web software
1 year later.. it seems very few developers have tapped into the power of reverse-ajax.. I’m guessing its because many webhosts don’t offer anything like it.
Google and Facebook both make extensive use of reverse Ajax. Google wave is powered by reverse ajax.. it’s pretty cool.
I’m thinkng to setup a reverse ajax server, for free.. for developers to test out. The way it works is that your client application (in a broswer) can bounce a message off the server and have other client applications (in a browser) receive that message instantly. So if you were writing a forum software, besides posting a new message to the database, you could also bounce it off our reverse ajax server so all other instances of your forum software would receive that message live, and could update their GUI
Any thoughts? If someone built a reverse-ajax version of vBulletin, they could dominate the forum market! There are so many applications for this
I’m still interested though rather clueless as to how I would implement this.
I recently set up a community site based on the open source Elgg system (kinda like a private Facebook). Reverse Ajax would enable all the users on the site to get updates instantly as their friends and others on the site made changes. Right now, the system is all client-side Ajax pulls.
What type of server are you thinking of setting up? I guess I need to know what technology would be on the server side before I can figure out what I’d need to change on the application side to take advantage of it.
http://cometdproject.dojotoolkit.org/
This is the open-source server that Google is using for PUSH. I’ve worked alot with cometd, however, it’s not possible to have the adequate shared security (for a hosting environment) without some modifications.
I am researching an adequate security model, which we could code into cometd and make it available for shared hosting
Not that I have any experience with it, but there’s also APE – http://www.ape-project.org/ which is either its own server or a set of modules for apache.
I wasn’t aware that this was called reverse AJAX, but you don’t really need any special server to do this? I first built a website that uses the ‘technology’ in late 2005 / early 2006.
So far I haven’t used it in any high volume site, because I figured that doing so would occupy too many webserver worker processes. I’m not sure how APE remedies this, but I guess that’s why you want to set up a separate server?
Subspace, I’m with you… I was experimenting with this in 2002 while developing a browser-based real-time chat app for a company. This is of course before XMLHttpRequest object and the word “ajax” came along but hell we were doing it all with frames back then. It’s all the same, just easier now.
But yeah no special server software is needed for this, just a willingness for Jodo to allow multiple instances of IIS’s handlers to be running for extended periods of time - what’s the average browser timeout? 2 minutes? Long time for a server process to run. Also, these extended processes are going to be behaving like server processes… that is, doing a lot more processing than your average split-second client request. But who knows, it may actually be more efficient…?
Tests will need to be done, because we’re talking about making a web server (I mean IIS etc, not the hardware) do something is was not designed to do. It may cause IIS to bog down, or unevenly assign cycles. But hey I’m just being devil’s advocate here. It needs to be tested.
Personally I don’t see a great need for it. It’s a hack. It’s interesting, but back in '02 I did make that real-time chat app work. It even told you when the other person was busy typing something! It used frames and meta refresh. Maybe I’ll put up a demo for you guys just for a laugh.
No.. this isn’t going to be an IIS server.. it will run off a Jetty server. Cometd/jetty have been tested with 50K simultaneous connections off a single low-end server. So it is very efficient. Something like this on IIS would be a disaster. Each connection doesn’t have a new thread/process in Jetty.
Also.. the server-side attempts to keep the connection open as long as possible (slow-load).. The client-side will reconnect every 2 to 5 minutes when the browser times it out.
Nothing very special.. But facebook, gmail and now google wave are making extensive use of it..
A single server could potentially serve alot of websites.. We’d probably setup a separate server for this, which clients could use. They’d need to alias the IP address to their domain name, so no cross-scripting issues occur.
Cometd basically allows you to setup channels. If you create a channel domain/chat, and messages posted to this channel would be received by all end-users. Simplifies the process. The dojo javascript library provides an event-driven framework that can be used with cometd… It’s really easy to use.