Reverse ajax in dropwizard

219 views Asked by At

I want to implement reverse ajax in Dropwizard application.How can i do that?? Is there any facility provided by Dropwizard for accomplishing this.?

Any comment will be appreciated. Thanks in advance

2

There are 2 answers

0
Sreeraj Karichery On BEST ANSWER

As far as i know reverse ajax is not directly available in Dropwizard.But the effect of reverse ajax can be established directly using either web-sockets or long polling. Web-sockets are efficient way of asynchronous communication between client and server without any page reloading on client.

There are many ways of establishing web-sockets in dropwizard and my favorite is jetty websocket.

a simple websocket working example is available here

1
gidim On

There's a few types of reverse AJAX (polling, websockets, piggy backing, comet). Atmosphere, an async comet/websockets framework works pretty well with Jersey. You can give it a try here:https://github.com/Atmosphere/atmosphere

Also there's seem to be a bundled Dropwizard/Atmosphere version here: https://github.com/mgutz/dropwizard-atmosphere/