简体   繁体   English

在Java服务和C#客户端之间为PubSub选择哪种技术

[英]Which technology to choose for PubSub between java service and C# client

Which technology would you suggest for PubSub between Java Service and C# desktop client. 您将为Java Service和C#桌面客户端之间的PubSub建议哪种技术。 What do you think about CometD? 您如何看待CometD? Is there any nice .net API for it? 是否有任何不错的.net API? Server and client will run within the same organization so can use different protocols Is CometD a right choice at all or would it be better to use TCP instead of HTTP? 服务器和客户端将在同一组织内运行,因此可以使用不同的协议CometD完全是正确的选择吗?还是使用TCP代替HTTP更好?

Since your apps run within the same organization, you will likely be able to use more efficient transport than HTTP, or even TCP, depending on your situation and requirements. 由于您的应用程序在同一个组织中运行,因此取决于您的情况和要求,您将有可能使用比HTTP甚至TCP更有效的传输方式。

The Data Distribution Service (DDS) is a standard by the OMG based on Pub/Sub. 数据分发服务(DDS)是OMG基于发布/订阅的标准。 Standardized language bindings are C, C++, Java and Ada, but C# and others are available as well. 标准化的语言绑定是C,C ++,Java和Ada,但也可以使用C#和其他语言。 Different languages as well as operating systems can be mixed in your system. 您的系统中可以混合使用不同的语言和操作系统。 Structured datatypes to be distributed are specified in a language-neutral format (by the standard a subset of OMG IDL), which is then translated into language-specific interfaces and datatypes to be used by your applications. 以与语言无关的格式(按标准是OMG IDL的子集)指定要分发的结构化数据类型,然后将其转换为特定于语言的接口和数据类型,以供您的应用程序使用。

It can use different transport layers, like UDP or also TCP. 它可以使用不同的传输层,例如UDP或TCP。 Although I can not determine from your brief description whether DDS would be your best choice, I think it is worth investigating. 尽管我不能从您的简短描述中确定DDS是否将是您的最佳选择,但我认为值得进行调查。 See this Wikipedia entry for a very brief introduction and list of references. 有关非常简短的介绍和参考列表,请参阅此Wikipedia条目

Warning: I have only used cometd (no atmosphere or even none-java solutions) 警告:我只用过Cometd(没有气氛,甚至没有java解决方案)

I like cometd as it was very fast to get started and the documentation was good. 我喜欢Cometd,因为它起步非常快,而且文档很好。 Also the javascript API worked without any issues. javascript API也可以正常工作。

and then the bayeux specification could be implemented on c# too: https://github.com/Oyatel/CometD.NET 然后也可以在c#上实现bayeux规范: https : //github.com/Oyatel/CometD.NET

http://bugs.cometd.org/browse/COMETD-23 http://bugs.cometd.org/browse/COMETD-23

You might want to look at some messaging protocols such as AMQP and STOMP . 您可能需要查看一些消息传递协议,例如AMQPSTOMP There's decent support for both protocols in both Java and .NET and you can choose your choice of message brokers such as RabbitMQ or ActiveMQ and others. Java和.NET都对协议都提供了不错的支持,您可以选择消息代理,例如RabbitMQ或ActiveMQ等。

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

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