我正在寻找关于设计WCF服务的一些反馈,该服务调用2-4个其他服务并将响应聚合回客户端,该客户端是基于Java的应用程序。虽然根据某些调用的长期运行性质,预期的请求数量很少,每天最多50次,但我认为将其设计为异步更好,但除了在operationcontract中标记为异步(如下所示)之外,我我不确定.NET 4.5的其他功能可以用于可扩展设计。
[ServiceContract]
public interface IService2
{
//IAsyncResult asynchronous pattern
[OperationContractAttribute(AsyncPattern = true)]
IAsyncResult BeginWorkerMethod(string message, AsyncCallback callback, object asyncState);
string EndWorkerMethod(IAsyncResult result);
}
我很感激有关设计建议的一些帮助