Web Services: more frequent "small" calls, or less frequent "big" calls

Posted by Klay on Stack Overflow See other posts from Stack Overflow or by Klay
Published on 2010-03-22T17:56:54Z Indexed on 2010/03/22 18:01 UTC
Read the original article Hit count: 440

In general, is it better to have a web application make lots of calls to a web service getting smaller chunks of data back, or to have the web app make fewer calls and get larger chunks of data?

In particular, I'm building a Silverlight app that needs to get large amounts of data back from the server in response to a query created by a user. Each query could return anywhere from a few hundred records to a few thousand. Each record has around thirty fields of mostly decimal-type data. I've run into the situation before where the payload size of the response exceeded the maximum allowed by the service.

I'm wondering whether it's better (more efficient for the server/client/web service) to cut this payload vertically--getting all values for a single field with each call--or horizontally--getting batches of complete records with each call. Or does it matter?

© Stack Overflow or respective owner

Related posts about web-service

Related posts about silverlight-3.0