Hey all,
I've finished implementing a prototype (or maybe the final version depending on
comments received) of a HTML5 based dashboard that replaces the Errai based dashboard. The
HTML5 based version can be seen here:
http://ticketmonster-vineetr.rhcloud.com/#monitor
and the corresponding pull request is at :
https://github.com/jboss-jdf/ticket-monster/pull/40/files
I request comments in two areas:
1. Supporting asynchronous HTTP request processing for JAX-RS resources
The current poller based approach is a bit expensive in that the client polls for
changes at an interval of ~3 second and Two pollers operate, for two sub-views in the
Backbone managed view and this is a bit expensive. I'd like to know if it would be
demonstrate a long polling solution here. The server would then respond only when the
state on the server changes; on timeout, the server would respond with the last state.
Admittedly this would look better for the scenario where the bot is inactive, but it's
better than aggressively polling an inactive app. We could demonstrate long polling,
possibly via the support offered by RESTEasy
<
http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html_single/index....;.
Should I consider this?
NB - This may require adding a RESTEasy BOM in JDF; I havent implemented anything
remotely close to a RESTEasy based prototype, so the GAVs in the BOM are unknown at this
moment.
2. Using JAX-RS for non-RESTful resources
The earlier Bot operated using Errai Services that happened to be RPC endpoints.
Transforming the bot service to use JAX-RS required throwing out the REST principles, and
as such the JAX-RS resources behave like RPC endpoints instead of REST resources. To this
extent, I had to use a mix of prototypical JavaScript classes and jQuery instead Backbone
Models on the client. Likewise on the server-side, the Bot Log service responds with crude
messages (see
http://ticketmonster-vineetr.rhcloud.com/rest/bot/messages ) so that the
textarea can be populated in the same manner as the Errai-based demo.
Should I attempt to conceive a RESTful Bot resource ?
Also, should I spend more time on a better Bot Log resource?
Thanks,
Vineet