views:

96

answers:

2

I’m creating an application that has a data dependency on another group’s data feed. They can give me a daily xml dump of the data that I can simply load into cache once a day OR I can make calls to a web service to get the data that way. If the data provider doesn't care which I use (same work for them either way) which should I ask for and why? Using asp.net cache web site etc…

+3  A: 

This depends entirely on the API exposed by their web service. If you are in a situation where you will need all the information, all at once, once a day, and there is no need to ever ask for anything more, then a simple XML reader may be all that you need.

On the other hand, the much more extensible solution is to hook into their web service, because then you can customize what kind of information you are gathering. If your requirements could update during the course of a day, or you don't need ALL the information, just a subset at any given time, then going through the web service may be better.

Ultimately, the better option depends on the business requirements. Would their web service be able to give you information that is formatted in a more useful way, and filtered in a relevant way? If so, you should go that route. If all you need is ALL the data, then XML might be simpler.

A: 

For this I'd choose to get an Atom feed, from which you can take the benefits of HTTP for caching and updating, and is also a valid XML feed. This way you don't have to process more data than what you actually need. XML dumps can be terrible for updates, analysis and implementation, while WebServices are terrible in general as you need to grok the WS-* stack of standards until your requirements are met (and possibly pollute your development environment with tools you rarely need). Alternatively I'd ask for a basic REST interface into the data, say one URL pr. day of updates or whatever you think you need.

AlexanderJohannesen