Treating a fat webservice in .net 3.5 c#

Posted by Chris M on Stack Overflow See other posts from Stack Overflow or by Chris M
Published on 2010-06-02T12:02:44Z Indexed on 2010/06/02 12:03 UTC
Read the original article Hit count: 196

Filed under:
|

I'm dealing with an obese 3rd party webservice that returns about 3mb of data for a simple search results, about 50% of the data in that response is junk.

Would it make sense then to remap this data to my own result object and ditch the response so I'm storing 1-2 mb in memory for filtering and sorting rather than using the web-responses own object and using 2-4 or am I missing a point?

So far I've been accessing the webservice from a separate project and using a new class to provide the interaction and to handle the persistence so my project looks like this

|- Web (mvc2 proj)
|- DAL (database/storage fluent-nhibernate)
|- SVCGateway (interaction layer + webservice related models)
|- Services
--------------
|- Tests
|- Specs

I'm trying to make the application behave fast and I also need to store the result set temporarily in case a customer goes to view the product and wants to go back to the results. (Service returns only 500 of possible 14K results).

So basically I'm looking for confirmation that I'm doing the right thing in pushing the results into my own objects or if I'm breaking some rule or even if there's a better way of handling it.

Thanks

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about web-services