pjaromin
29 Oct 2009, 1:48 PM
I posted this on the GWT group, but thought that maybe there was something in GXT specifically to assist with this -- so I hope you don't mind the post here as well.
I'm writing a remote service that executes a long-running process that I'm updating on the client-side using a progress bar widget.
What I'd like to do is have two methods in the service:
String longRunningProcess(Request request);
Progress checkProgress(String id);
The question is, what's the best way to get the ID back to the client?
The UUID should be created on the server side -- but if I generate it in the "longRunningProcess" method, it won't return until AFTER the process is complete.
I currently see two options:
1) add an "primeProcess" method to the service that simply returns the next UUID. This UUID is provided by the client in the request.
2) Have the client generate the UUID...but the server really should be the place the ID is generated, since it's managing them and can guarantee uniqueness.
Is there a better way? How do others handle this?
Thanks!
-Patrick
I'm writing a remote service that executes a long-running process that I'm updating on the client-side using a progress bar widget.
What I'd like to do is have two methods in the service:
String longRunningProcess(Request request);
Progress checkProgress(String id);
The question is, what's the best way to get the ID back to the client?
The UUID should be created on the server side -- but if I generate it in the "longRunningProcess" method, it won't return until AFTER the process is complete.
I currently see two options:
1) add an "primeProcess" method to the service that simply returns the next UUID. This UUID is provided by the client in the request.
2) Have the client generate the UUID...but the server really should be the place the ID is generated, since it's managing them and can guarantee uniqueness.
Is there a better way? How do others handle this?
Thanks!
-Patrick