I came across a nice intro to Reverse Ajax with a whole set of simple graphics to explain the interaction.
The blog entry is on the curiously named gmapsdotnetcontrol blog, and we go through the classic and Ajax models (JJG style) with polling and comet before getting to the piggyback model:
And finally the Full Monty Reverse Ajax
For me Reverse Ajax is not so much about the technology on how we get the message to the browser, but more about the programmers interface.
The DWR Chat example has to be the simplest code to do chat anywhere. The full source can be seen through fisheye, but the core goes like this:
WebContext wctx = WebContextFactory.get(); String currentPage = wctx.getCurrentPage(); // Find all the browsers on the current page: Collection sessions = wctx.getScriptSessionsByPage(currentPage); DwrUtil utilAll = new DwrUtil(sessions); // Manipulate all the browsers to repopulate the message list utilAll.removeAllOptions("chatlog"); utilAll.addOptions("chatlog", messages, "text");