简体   繁体   English

WWSAPI双工频道服务

[英]WWSAPI duplex channel service

We are in the start phase of defining a client-server architecture based on WWSAPI. 我们正处于基于WWSAPI定义客户端 - 服务器架构的开始阶段。

One of our services should allow the client to connect and subscribe to some data updates based on certain criteria. 我们的一项服务应该允许客户端根据特定条件连接和订阅某些数据更新。 This data should then be delivered, when created or updated, through a callback from the server to the client. 然后,在创建或更新时,应通过从服务器到客户端的回调来传递此数据。

In WCF, it is possible to use duplex channels that allows the client to provide a callback for the server, however I've read that duplex channels are not supported with WWSAPI. 在WCF中,可以使用允许客户端为服务器提供回调的双工通道,但是我已经读过WWSAPI不支持双工通道。

Is this correct? 这个对吗? We already have good experience with defining a duplex service in WCF and consume it with a WWSAPI client, but is it possible to also define a duplex service with WWSAPI? 我们已经拥有在WCF中定义双工服务并使用WWSAPI客户端使用它的良好经验,但是是否也可以使用WWSAPI定义双工服务?

Does anyone have any good examples on this? 有没有人有这方面的好例子? It's really hard to find good WWSAPI examples in the midst of all the WCF info out there... 在所有WCF信息中找到好的WWSAPI示例真的很难......

Update: 3 views in a week! 更新:一周3次观看! Re-tagged with C++ 用C ++重新标记

查看TCP通道层示例 ,RequestReply 客户端 / 服务器是您的解决方案。

Since you mentioned being able to consume a WCF duplex service with a WWSAPI client, I encountered the same restriction and worked around it by implementing a WCF service that sits between the client and server. 由于您提到能够使用WWSAPI客户端使用WCF双工服务,因此我遇到了相同的限制,并通过实现位于客户端和服务器之间的WCF服务来解决此问题。 Our's is a router but that isn't strictly necessary. 我们的是路由器,但这不是绝对必要的。 It polls the WWSAPI server periodically and then does a callback to the client if the value has updated. 它会定期轮询WWSAPI服务器,然后在更新值时对客户端进行回调。 While not ideal as there will be a balance between lag between update and callback versus load on the server with the polling, it does work. 虽然不理想,因为更新和回调之间的延迟与使用轮询的服务器上的负载之间会有平衡,但它确实有效。

In our case we were using WCF clients, but as mentioned above you appear to have gotten the WWSAPI --> WCF duplex service working already. 在我们的例子中,我们使用的是WCF客户端,但如上所述,您似乎已经获得了WWSAPI - > WCF双工服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM