E
Ethan Strauss
Hi,
I have a web service which is doing a lot of processing and taking 4-5
minutes to do so. The processing is split into several discrete steps and I
would like for the service to be able to tell the client when it is done
with each step.
I have tried to do this in a couple of ways and neither have worked. Any
ideas how I might get it to work?
What I have tried was:
1) Splitting out each processing step into a different web method and then
having the client call each method as the one before it finished.
The sort of work, in that the client knew what was happening when,
but the I could not get the service to remember the intermediate results and
thus it did everything after the first step on null objects. I thought of
passing the results back to the client and then having it pass them back to
the service, but there is too much data in the intermediate results for that
to be reasonable.
2) Having the WebService class have a private status string and a public
WebMethod GetStatus which returns that string. The service then updates the
string as appropriate and the client asks for it periodically.
The value of the status string never actually changed. I wrote code
(C#):
status = "Starting Blast analysis.";
BlastSolutionSet thisSolution =
DatabaseAccess.GetExperiment(experimentGuid);
thisSolution.BlastAll();
status = "Collating Blast Data";
thisSolution.AssignBlastResults();
status = "Querying NCBI";
thisSolution.CollectNcbiData();
status = "Done";
In debug mode, the value of status was always "".
Ay thoughts?
Thanks!
Ethan
I have a web service which is doing a lot of processing and taking 4-5
minutes to do so. The processing is split into several discrete steps and I
would like for the service to be able to tell the client when it is done
with each step.
I have tried to do this in a couple of ways and neither have worked. Any
ideas how I might get it to work?
What I have tried was:
1) Splitting out each processing step into a different web method and then
having the client call each method as the one before it finished.
The sort of work, in that the client knew what was happening when,
but the I could not get the service to remember the intermediate results and
thus it did everything after the first step on null objects. I thought of
passing the results back to the client and then having it pass them back to
the service, but there is too much data in the intermediate results for that
to be reasonable.
2) Having the WebService class have a private status string and a public
WebMethod GetStatus which returns that string. The service then updates the
string as appropriate and the client asks for it periodically.
The value of the status string never actually changed. I wrote code
(C#):
status = "Starting Blast analysis.";
BlastSolutionSet thisSolution =
DatabaseAccess.GetExperiment(experimentGuid);
thisSolution.BlastAll();
status = "Collating Blast Data";
thisSolution.AssignBlastResults();
status = "Querying NCBI";
thisSolution.CollectNcbiData();
status = "Done";
In debug mode, the value of status was always "".
Ay thoughts?
Thanks!
Ethan