我应该使用 CORBA、MessagePack RPC 或 Thrift,还是完全使用其他东西?
我正在为新的硬件设备编写软件,我希望任何类型的新第三方应用程序都能够访问(如果他们愿意)。
该软件将是一个本机进程 (C++),应该可由想要支持硬件设备的第 3 方游戏和应用程序进行轮询。这些第三方应用程序还应该能够在订阅的基础上从本机进程接收事件。因此,除了本机进程之外,我还将向 3rd 方开发人员提供“连接器”库,用于他们可能选择嵌入到应用程序中的所有平台/语言(Java、C++、Python 等),以便他们可以轻松连接到设备上几乎不需要编写任何额外的代码。我想针对所有桌面/笔记本电脑操作系统平台,并且非常清楚我想要公开哪些功能,但理想情况下我不想太卡住(即我希望它能够从客户端和服务器优雅地扩展)观点)。
我正在寻找未来的可靠性、性能、可维护性、跨平台/语言灵活性以及开发的易用性,按顺序排列。
我应该用什么?
CORBA、MessagePack-RPC、Thrift 还是其他什么?
(由于 ICE 的许可,我省略了 ICE)
I'm writing software for a new hardware device which I want any kind of new third-party application to be able to access if they want to.
The software will be a native process (C++) that should be pollable by 3rd party games and applications that want to support the hardware device. Those 3rd party apps should also be able to receive events from the native process, on a subscribe basis. So aside from the native process, I'll also supply "connector" libraries to the 3rd party developers, for all platforms/languages that they might choose (Java, C++, Python etc.) to embed in their apps so they can easily connect to the device with hardly any extra code needing to be written by them. I want to target all desktop/laptop OS platforms, and have a pretty good idea of what functions I want to expose, but ideally I don't want to be too stuck (i.e. I want it to be elegantly scalable from both client and server perspectives).
I'm looking for reliability going forward, performance, maintainability going forward, and cross-platform/language flexibility going forward, and ease of development, in that order.
What should I use?
CORBA, MessagePack-RPC, Thrift, or something else entirely?
(I've omitted ICE because of it's licensing)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Thrift 或 Message Pack 是未来的最佳选择。两者都很时尚、重量轻,并且不会给您的流程增加太多延迟。它们支持大多数通用语言,并且正在积极开发中。在现阶段,我个人更喜欢节俭,但消息包似乎确实承诺了很多功能。
我认为 thrift 可能不像我们想要的那样对 Windows 友好,但人们正在 Windows 上使用它。
这是 Windows 上 Thrift 的入门指南。
http://wiki.apache.org/thrift/ThriftInstallationWin32
在 Windows 上仅安装和获取 Thrift 编译器可能会很麻烦。使用生成的文件取决于您选择的语言,许多语言都可以通过导入 thrift 库来很好地支持运行文件。 (Java很简单,MAVEN神器)
RPC框架可用?
在我看来,CORBA 既古老又麻烦,而且非常重量级。
Thrift or Message Pack is the best option going forward. Both are sleek, light weight and do not add much latencies to your process. They have support for most of the common languages, and are in Active Development. At the current stage I would prefer thrift personally but message pack does seem to promise a lot of features.
Thought thrift might not be as windows friendly as we want but people are using it on windows.
This is a starter guide for thrift on windows.
http://wiki.apache.org/thrift/ThriftInstallationWin32
Only installing and getting the Thrift compiler can be troublesome on windows. Using the generated files depend on the language you choose and lot of the languages have good support to run the files by importing thrift libraries. (Java it is very easy, MAVEN artifact)
There is a discussion on the RPC frameworks available at RPC frameworks available?
CORBA according to me is old cumbersome and very heavyweight.
如果古老和重量级的东西还没有让你望而却步,那么过时的东西肯定会让你望而却步。无论如何,我可以告诉您我们最近在工作中使用 Google Protocol Buffers 的情况,它们非常易于使用。
从开发人员的角度来看,您所需要做的就是构建一个 GPB(这实际上并不困难),然后它就会为您生成源文件。最终结果是一个跨平台的二进制消息传输消息传递接口(想想 XML 和有限的 RMI,而不是类似 MPI 的功能)。
我们在 Windows 上使用它与运行相同软件的基于 Arm 的 Linux 系统(嵌入式 Arm 的 TS-7200)进行通信。据我所知,它与多种语言兼容。
If ancient and heavyweight don't put you off, obsolete definitely should. Regardless, I can tell you what we've been using Google Protocol Buffers at work recently, and they're pretty easy to use.
From the developer's perspective, all you need to do is have a build of GPB (which really isn't that difficult), and then it will generate source files for you. The end result is a cross-platform binary message transport message passing interface (think XML and limited RMI, not MPI-like functionality).
We use it on Windows to talk to an Arm-based Linux system (TS-7200's from embedded arm) running the same software. to my knowledge, it is compatible with many languages.
CORBA 是目前唯一适用于我的系统的免费“RPC”事物,尽管它的扩展性非常差。 Thrift 还不支持 Windows。 MessagePack-RPC 也尚未在所有语言和操作系统中可用,尽管它仍在开发中。如果 CORBA 具有良好的可扩展性,它可能根本就不会过时。
协议缓冲区和消息传递可以工作,我必须为每个平台/语言开发客户端和服务实现。它还具有很强的可扩展性。我已经决定了。
CORBA is the only free "RPC" thing that would work for my system right now, even though it scales very badly. Thrift isn't Windows-friendly yet. Neither is MessagePack-RPC yet available in all languages and OSs, even though it's still in development. If CORBA was elegantly scalable it probably wouldn't have become obsolete at all.
Protocol Buffers and messaging would work, I'd have to develop a both a client and service implementation for every platform/language. It would also be very scalable. I've decided on this.
我目前正在将 Apache Thrift 用于 Hospital Manager 项目。它在许多方面都比 CORBA 更好,更不用说它是轻量级的并且更容易实现和理解。与 CORBA 相比,Thrift 的学习曲线绝对是微妙的,但 Thrift 的文档是最糟糕的。
我正在使用 Obj-C 和 Java 客户端连接的 Ruby Thrift 服务器。 Thrift 解析器或“编译器”可以很好地为您想要的语言生成源文件,尽管它太冗长了。如果我要开始一个新项目,我肯定会考虑实现 Thrift 或 Google ProtoBuffs,因为 CORBA 确实已经过时了,并且将来可能不会实现新技术,更不用说有许多针对 CORBA 的漏洞和利用不会进行修补,因为它不再处于开发阶段,这会给您的新项目带来一些严重的安全漏洞。
Thrift 支持多种编程语言:截至撰写本文时,C++、Java、Python、PHP、Ruby、Erlang、Perl、Haskell、C#、Objective-C、JavaScript、Node.js、Smalltalk、OCaml 和 Delphi。我认为,对于您的项目而言,支持多种语言是关键。
I'm currently using Apache Thrift for a Hospital Manager project. It is better than CORBA in many areas, not to mention it is lightweight and much easier to implement and understand. The learning curve for Thrift is definitely subtle compared to CORBA, but the documentation for Thrift is the worst thing.
I'm using a Ruby Thrift server to which Obj-C and Java clients connect. The Thrift parser or "compiler" does a pretty good job generating source files for the languages you want, although it is far too verbose. I would definitely look into implementing Thrift, or Google ProtoBuffs if I was starting a new project, since CORBA is really outdated, and might not implement new technologies in the future, not to mention that there are many vulnerabilities and exploits targeting CORBA that will not get patched since it's not in development anymore, presenting some serious security holes on your new project.
Thrift supports many programming languages: C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Objective-C, JavaScript, Node.js, Smalltalk, OCaml and Delphi as of this writing. Supporting multiple languages is key, I think, for the purpose of your project.