views:

705

answers:

1

Problem:

  • We have a web app that calls some web services asynchronously (from the page).
  • Normally this is fine, but some are failing under load test (due to timeouts).

What are (if there are any) any suggested "best practices" for calling web services asynchronously in a web application?

  • Are there any patterns that may be of use?
  • Should direct calling of services be avoided? (perhaps resorting to some other method such as AJAX)?

To Illustrate - Direct Calling:

WSNameSpace.WSName svc = new WSNameSpace.WSName();
svc.EventName += new WSNameSpace.EventNameEventHandler(CallbackDelegate);
svc.ServiceMethodAsync(param1, param2);
  • Should I focus more on improving the exception handling rather than calling the services?

Many thanks.

Rob

Update

I have been Googleing and have found this article on creating "service agents", while it relates to WinForms, I will definitely have a sit down and read of this later to see how it affects my thoughts on this :)

+4  A: 

Use async call to webservice with async pages. Something like this http://gofrom.us/6LC

Zote
Thanks for the article, will spend some time later digesting this properly. Looks like it could be very useful. +1 from me.
Rob Cooper
That link eventually gets you to http://www.eggheadcafe.com/articles/20060918.asp
Brian