473,729 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Returning large number of results from a WS

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.d ata" 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
3 1243
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
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********@gma il.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
6393
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
8
3700
by: san | last post by:
Hi, I wanted to know if this is possible and if so, how do I do it. Say, I have a query "SELECT * FROM Table WHERE Column="some_value". This executes on a very large data set and I would like to return the results as they query executes rather than wait for the whole query to execute. Basically, I want to get the results as they are prepared by the database. Any way to do this?
4
5743
by: Bill Moran | last post by:
I'm having a little trouble understanding how to do something. I assume I'm just missing it in the documentation, so a pointer to relevent docs would be as welcome as a direct answer. I have a project in which I'll need to create a number of stored procedures that are basically wrappers around complex SQL statements. Along the lines of: CREATE OR REPLACE FUNCTION expired(anyelement) RETURNS SETOF anyelement AS ' SELECT *
0
1264
by: SC | last post by:
I'm developing a site that may eventually have a very large database of users (hopefully, but who knows). Often there will be queries with multiple joins and sometimes may include a few fulltext searches. Each page of results will have a limited number of results displayed (obviously). As I understand it, MySQL caches only exact queries, so doing a LIMIT (x,y) on each query to get results for the specific page will cause MySQL to run the...
17
12787
by: Sri | last post by:
How do you add an n-bit number in C? Regards, Sri
10
2430
by: randomtalk | last post by:
hello, i have another problem i feel that i have to be missing something.. Basically, i've written a recursive function to find all the prime up to a number (lim).. here is the function: The function basically takes in a list of all the prime number found, it takes the next number to be tested for (next) and the limit it will go up to. It divide next by the list of previous prime numbers if next is not bigger than lim, count up all the...
6
5476
by: InnoCreate | last post by:
Hi everyone. I've recently written a classic asp website which uses an MS Access datasource. I know this is less than an ideal data source as it has limited functionality. I have a search form on my website which allows users to define parameters and return results accordingly. The problem i have is a need to return these results in a random order each time. With SQLServer i know NEWID() would do the trick - used this many times before...
1
6320
by: Lars B | last post by:
Hey guys, I have written a C++ program that passes data from a file to an FPGA board and back again using software and DMA buffers. In my program I need to compare the size of a given file against a software buffer of size 3MB. This is needed so as to see which function to use to read from the file. As the files used range from very large (>30GB) to very small (<3MB), I have enabled large file support and I obtain the file size by using the...
160
5860
by: DiAvOl | last post by:
Hello everyone, Please take a look at the following code: #include <stdio.h> typedef struct person { char name; int age; } Person;
0
8913
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.