Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Streaming" server

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is when you know you have been thinking too much into the assignment
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcel,
I'd have to agree with Min. Keep things simple and to the point. If the assignment specs don't mention something, don't think about it! If you do, you're going to spend 6 months on the project instead of the usual 100 hours (not a good thing).
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
Phhuuu, you're both right. I know I've been thinking about it too much, but I wasn't *really* going for the streaming solution ;-)
Regards,
Marcel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic