Implementing observer pattern using WCF

后端 未结 6 991
眼角桃花
眼角桃花 2021-02-04 22:20

When I first posted this question I had strong coupling between my web service and application controller where the controller needed to open multiple threads to the service and

6条回答
  •  说谎
    说谎 (楼主)
    2021-02-04 22:36

    One of the ways to achieve this is by invoking your WS asynchronously (http://www.stardeveloper.com/articles/display.html?article=2001121901&page=1, http://www.ondotnet.com/pub/a/dotnet/2005/08/01/async_webservices.html), and then updating the GUI in the callback.

    However, you could have timeout problems if the querying of data takes too long. For example, if one of the supplier's web site is down or very slow, this could mean that the whole query could fail. Maybe it would be better if your business logic on the client side does the merging instead of WS doing it.

提交回复
热议问题