posted 19 years ago
Hi all,
This just popped up the other day...
Should the server rather "stream" the results to the client or should it send all data at once?
I could either first fill a collection with the results and then send the collection over the network at once or I could read 20 records from the database send this chunk, then read the next 20, etc. The first simple solution can place a heavy load on the server if 50 clients query a database of let's say 3000 records. Because 50 collections holding 3000 objects will have to fit into the server's memory...
I know the JRE can be tweaked with command line arguments concerning stack and heap sizes but I'd rather try to avoid OutOfMemoryErrors in the first place.
Regards,
Marcel