Take the 2-minute tour ×

I am developing a rich-client application, where the user-interface is html/css/javascript (codeigniter framework), and the server portion is written in Java. Essentially, this is a monitor / control system where a user can issue a command via the ui, and the backend will carry out that request.

Currently, RPC is done over XML-RPC. Sending requests, and receiving responses is working very well. However, my latest issue involves real-time ui updates.

The server receives real-time updates from whatever it's monitoring, and I need to reflect those changes in the ui, immediately. Currently, we use a XMLHttpRequest to long poll the database for any changes, and then update the ui. Obviously, this has many disadvantages, immediacy being the main concern.

How about using XML-RPC to open a request, and only respond when there has been an update (of interest). Once that occurs, update the ui, and open another request; repeat. However, I am unsure of how this might be implemented, since I do not believe you can call a JavaScript function from a Controller in Codeigniter (in my mind, this is essential, how else can I update the page elements after they've initially been loaded).

I'd appreciate any suggestions.

Edit: I've read about the comet technique, and web sockets, and unfortunately web sockets is not realistic for this project. Comet is more or less what I am suggesting in regards to using xml-rpc and a long, open request. So, please, any suggestions are welcome OTHER THAN comet and web sockets.

share|improve this question
You might want to read up on Web Sockets. en.wikipedia.org/wiki/WebSockets –  jessegavin Mar 15 '11 at 3:44
add comment

1 Answer

Check out Comet.

share|improve this answer
Thanks for the suggestion. I edited my original question after you posted. –  meta.matt Mar 15 '11 at 19:23
add comment

Your Answer


