jquery - How to get intermediate feedback from my REST service for a single GET request -


in user interface, trying implement progress bar shows percent of completion of work user request.

my back-end rest service needs lot of computations; hence relatively slow. want show user work in backend finished. instance: task1 finished, working on task2 (hence show 50% on progress bar)

my problem:

the service returns result after has finished entire task. not know how intermediate feedback show user percent of work complete he/she should patient.

just clarify, before start suggesting of following:

  1. i not want use gif ajax loader.

  2. service optimized, cannot fine tuned further.

  3. the service work atomic, cannot further broken down in more 1 service without causing further performance penalty due additional network traffic.

let me know if above not possible accomplish, can stop search.

what want bi-directional communication http-server , there 2 ways it:

  • rest-polling: set second api-call client poll in regular intervals current status of computation.

  • websockets: set websocket-connection between client , server, allow server initiate communication client , send message task finished. adding websockets cause more network traffic rest-polling.

if none of these options you, don`t think want possible.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -