3

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

Lygub Org
  • 125
  • 8

2 Answers2

1

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

0

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/

gidim
  • 2,314
  • 20
  • 23