开发者

Multiple clients to singleton WF Services

Do Windows Workflow Services allow multiple clients to one service? Basically what I am trying to do is this: construct a WF service that allows clients to "subscribe to the service" and then when certain events trigger a handler, it broadcasts data to each client. So basically something is going to process in the background and then when the services receives, lets say a small string, it broadcasts that string to each client via callbacks.

So what I need to figure out first is if I have a service with a Subscription()开发者_StackOverflow中文版 method exposed to the world and if I have let's say 3 clients call that method, store information about their callback endpoint and implementation to retain for future data "broadcasts"; can all of this happen in one WF service? If so, how do I reference my clients during broadcast callbacks?


I resolved this by saving implementing callback services in the client. On the actual service I have subscribe() and unsubscribe() service methods that take in the clients endpoint URI as one of the parameters. After some authentication on other parameters, the URI is saved to a client pool collection. To do multicasts back to all clients, I iterate through URI collection and perform callbacks for each URI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜