多个客户端到单个 WF 服务

发布于 2024-09-02 11:08:05 字数 300 浏览 2 评论 0原文

Windows 工作流服务是否允许多个客户端使用一项服务?基本上我想做的是:构建一个 WF 服务,允许客户端“订阅服务”,然后当某些事件触发处理程序时,它将数据广播到每个客户端。因此,基本上某些事情将在后台处理,然后当服务接收到一个小字符串时,它会通过回调将该字符串广播到每个客户端。

因此,我首先需要弄清楚的是,我是否有一个具有向世界公开的 Subscription() 方法的服务,并且如果我有 3 个客户端调用该方法,则存储有关其回调端点和实现的信息以保留未来的数据”广播”;所有这些都可以在一项 WF 服务中实现吗?如果是这样,我如何在广播回调期间引用我的客户?

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() 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳公公是暖光 2024-09-09 11:08:05

我通过在客户端中保存回调服务的实现来解决这个问题。在实际服务中,我有 subscribe()unsubscribe() 服务方法,它们将客户端端点 URI 作为参数之一。对其他参数进行一些身份验证后,URI 将保存到客户端池集合中。为了向所有客户端进行多播,我迭代 URI 集合并为每个 URI 执行回调。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文