By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,531 Members | 2,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,531 IT Pros & Developers. It's quick & easy.

Returning large number of results from a WS

P: n/a
Hi,

I have a web service that may return a very large amount of data. I want
that data to return in chunks, like first return 10% of data than return the
next 10% and so on, until all is finished. How are other people doing this?
I have come up with the following way:
While inside the webmethod, fetch the data from the db and store it in a
file called "someguid.data" and return the guid. The client will receive a
guid and request again, by calling another method, this time requesting 10%
of this guid. The ws on receiving this guid and the n% requested, willl open
the file and return the n% and close the file again. This way client will go
on requesting until 100% data has been received and the file will be
deleted. I know I'll have to make sure that the file does get deleted at all
costs in diffierent scenerios, but that is another issue to be tackled
later. For now I want this primary task of returning large amount to data to
be completed.
Am I thinking ok ?

Regards,
K.
Apr 2 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Kamran,

Can I ask why you want to deliver the data in chunks rather than in one
go?

Remember, usually, the less negotiation (opening connections, making a
request to IIS etc) that has to go on, the better?

Josh
http://www.thejoyofcode.com/

Apr 3 '06 #2

P: n/a
Hi,

thanks for the reply, I'm trying to do this because it takes a lot of time
to get that amount of data and I want the client to be able to cancel it
after receiving some portion of the data if he chooses to do so.

I must get the solution for this.

regards,

Ab.

"Josh Twist" <jo********@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi Kamran,

Can I ask why you want to deliver the data in chunks rather than in one
go?

Remember, usually, the less negotiation (opening connections, making a
request to IIS etc) that has to go on, the better?

Josh
http://www.thejoyofcode.com/

Apr 4 '06 #3

P: n/a
Hi Kamran,

I replied to a similar post a while back where the OP needed to write a
cancellable Web Service. Maybe this can work for you also? Please bear
in mind that this is a very simplified example.

http://groups.google.com/group/micro...dffb199ec04236

Josh
http://www.thejoyofcode.com/

Apr 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.