- Start your long running request (from client), running on a separate thread in the server, and return a unique id for that process.
- On the server, persist the state of that request using some Id. (do this every X seconds).
- On the client, make a request to poll (2) every X seconds for the status of the process (use the Id from (1)).
- Update something on your UI to show the % completion from (3).
- Once polling has shown that the long running process is complete, make a final request to get the result (payload).
Sounds like a lot, but that's how we've been doing it for a while. Of course there are many technologies you can use to do it from XHR, to WebSockets, to Comet/Channels/Errai.
Sincerely,
Joseph
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MumL3pU8eUgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment