Wednesday, May 25th, 2005

Messaging with Ajax and ActiveMQ

Category: Ajax, Java, Server

>There is more afoot with messaging and Ajax. ActiveMQ is an open source MOM, and it now has support for Ajax.

Ajax support in ActiveMQ builds on top of the REST connector for ActiveMQ which allows any web capable device to send or receive messages over JMS.

Client side view

On the client the web browser uses a simple JavaScript library which uses XmlHttpRequest to make calls on the REST API to send or receive messages.

This means that the DHTML client can send or receive messages asynchronously from the users interaction and can easily databind XML messages received with the HTML DOM to produce some revolutionary applications all with standard DHTML technologies.

The web browser can then render active views of information which can update in real time.

Server side view

Here each HTTP GET or POST is just a regular use of the REST API and so doesn’t particularly care what the client is; whether its JavaScript or C or Ruby/Python whatever.

We use a MessageServlet on the server side to handle the HTTP traffic; together with an optional NIO based servlet engine (Jetty) for handling large numbers of concurrent clients.

On a site note: LogicBlaze is a new company that recently got funded by Simula Labs to offer support and services around Active* products.

Related Content:

Posted by Dion Almaer at 10:02 am
1 Comment

+++--
3.2 rating from 9 votes

1 Comment »

Comments feed

xcvxvxcv

Comment by asdasdasd — May 3, 2006

Leave a comment

You must be logged in to post a comment.