HighTechTalks DotNet Forums  

providing progress to client

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss providing progress to client in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
cgambol@gmail.com
 
Posts: n/a

Default providing progress to client - 03-22-2007 , 01:13 PM






I am using vs 2003 and .net 1.1.

I have a web service that does some work on a list of objects.
Each object takes about a second to process.
Lets say the client sends me a list of 1000 objects.
This will take me 1000 seconds to complete.

While processing I would like to be able to give the client some
feedback (if they want it).

I was thinking of having 2 methods:

one to do the work: DoWork(uniqueId as string, ...)

and

one to provide status: GetProgress(uniqueId as string) as double

DoWork would save the progress in an application variable.

GetProgress would get the value out the the app variable and return it
to the client.

Does this sound right or is there another way I should do this.

I also thought about writing the progress to a database and let the
client query the db for the current value???


Thanks,

tcochunk


Reply With Quote
  #2  
Old   
Scott M.
 
Posts: n/a

Default Re: providing progress to client - 03-23-2007 , 12:56 AM






This is not possible with web services, since one web service works via one
request and one response (you can only call one method at a time and only
send one response at a time). This is the price you pay for working with a
distributed architecture. Unless you created a client side application that
could "poll" a web service continuously.


<cgambol (AT) gmail (DOT) com> wrote

Quote:
I am using vs 2003 and .net 1.1.

I have a web service that does some work on a list of objects.
Each object takes about a second to process.
Lets say the client sends me a list of 1000 objects.
This will take me 1000 seconds to complete.

While processing I would like to be able to give the client some
feedback (if they want it).

I was thinking of having 2 methods:

one to do the work: DoWork(uniqueId as string, ...)

and

one to provide status: GetProgress(uniqueId as string) as double

DoWork would save the progress in an application variable.

GetProgress would get the value out the the app variable and return it
to the client.

Does this sound right or is there another way I should do this.

I also thought about writing the progress to a database and let the
client query the db for the current value???


Thanks,

tcochunk




Reply With Quote
  #3  
Old   
cgambol@gmail.com
 
Posts: n/a

Default Re: providing progress to client - 03-23-2007 , 01:32 PM



Because it is a long running operation the call will be made from the
client async'ly. Once they make the 1st call (async'ly) they are free
to make other requests of the same web service. One of the other
calls would be: what is the status of the first call I made?

This should absolutely be possible.

I just want to know if my inteneded approach sounds reasonable?

tcochunk


Reply With Quote
  #4  
Old   
Damon Allison
 
Posts: n/a

Default Re: providing progress to client - 03-23-2007 , 05:06 PM



Using .net 1.1 that is a reasonable approach. If you have multiple
clients watch performance. You could look into a duplex channel to
implement callbacks with WCF but that is not an option here.


Damon


cgambol (AT) gmail (DOT) com wrote:
Quote:
Because it is a long running operation the call will be made from the
client async'ly. Once they make the 1st call (async'ly) they are free
to make other requests of the same web service. One of the other
calls would be: what is the status of the first call I made?

This should absolutely be possible.

I just want to know if my inteneded approach sounds reasonable?

tcochunk


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.