C# – faster: web service or XML server output

cnetweb servicesxml

The Central Bank of Russia as any other central bank provides a service to get exchange rates between ruble a number of other world currencies.

Web service: http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx

XML output: http://www.cbr.ru/scripts/XML_daily.asp?date_req=25/11/2009

.NET can easily read both. But what is faster and more reliable? Which could you recommend to choose?

btw, European Central Bank provides only XML output and only for today: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

Best Answer

Since they both come from the same source they are both just as likely to be reliable. As for speed it would be impossible to tell and is likely to fluctuate due to environmental variables that cannot be known from your question alone.

As with all things - code the solution that is the clearest, easiest to read, and easiest to maintain. Then, if performance becomes and issue, profile your application to determine if this data feed is the source of your performance problem. Then, if you have verified that it is in fact the source of the performance problem then begin investigating ways to improve the performance.

All things being equal, I would speculate that these two data feeds would be retrieved and read by your application at similar speeds.

Related Topic