使用 RPC 或其他方式
现在RPC还在使用吗?或者rpc被其他技术取代了? 如果我用 C++ 开始新项目,我应该考虑使用 RPC 吗?
更多信息,因为我知道 RPC 仍在生产代码中使用:
我有两个应用程序可以相互通信。这两个在同一台机器上,但一个是服务,第二个是用户应用程序。用户应用程序每 2.3 秒发送一次到服务应用程序。 rpc的第二种用法。我有 1 个客户端和许多具有本地数据库的计算机。该客户端需要从这些计算机获取一些数据。
对于这两个场景,我应该使用 Thrift 之类的东西吗?或者它太大了?
Does RPC is still in use nowadays. Or rpc were replaced by other technology?
If i start new project in C++ should i consider use of RPC?
More info because i know that RPC is still in use in production code:
I have two apps to communicate each other. These two are on same machine but one is service, second is user app. User app send to service app every 2,3 seconds.
Second usage of rpc. I have 1 client and many computers that have local database. And that client need to get some data from these computers.
Should i use something like Thrift for these two scenerios? Or its too big for that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
远程过程调用是一个非常通用的想法,而不是特定的东西。有ZeroC Ice、CORBA,Java RMI、SOAP、DRb, WCF 以及更多围绕 RPC 理念构建的技术。它们确实正在被使用。例如,一些 电子货币交易所 (ECN) 使用 CORBA, 使用 ZeroC href="http://www.skype.com/" rel="nofollow">Skype、惠普,soap用...好吧希望大家都用肥皂。
但很难回答是否应该考虑这项技术。如果你应该,那么你应该采用什么解决方案。这取决于太多细节。但要问的主要问题是——你想要实现什么目标?这些都是重要的技术,有些可以节省您大量的宝贵时间,有些可以帮助您集成用不同语言编写的应用程序等等。基本上,每个解决方案都有其缺点和优点。
如果您确定需要它,我建议您三思而行,并决定在项目中的哪些位置需要它以及用途。如果您决定使用 RPC,我会推荐您 ZeroC Ice。它是免费的、开源的、可伸缩的和可扩展的,支持大量的现代编程语言,而且它周围的社区似乎相当活跃。
希望有帮助。祝你好运!
Remote Procedure Call is a very generic idea and not something specific. There are ZeroC Ice, CORBA, Java RMI, SOAP, DRb, WCF and a lot more technologies that are built around the idea of RPC. They are being used indeed. For example, CORBA is used by some Electronic Currency Exchanges (ECNs), ZeroC is used by Skype, Hewlett-Packard, soap is used... well I hope everyone uses soap.
But it is hard to answer whether you should consider this technology or not. And if you should than what solution you should go with. It depends on too many details. But the main question to ask is — what are you trying to achieve? These are all serious technologies, some can save you tons of valuable time, some can help you integrate applications written in different languages, etc. Basically, every solution has its cons and pros.
If you are certain that you need it, I'd recommend thinking about it twice and decide where in your project you need it and what for. If you decide to go with RPC, I'd recommend you ZeroC Ice. It is free, open source, scalable and extendable, supports tons of modern programming languages and the community around it seems pretty active.
Hope it helps. Good Luck!
RPC广泛应用于windows操作系统中。出于高性能的原因,我使用 RPC 来调用缓存服务。
RPC is widely used in windows operating system. I use RPC to invoke a cache service, for reasons of high performance.
如果您确定需要 RPC,我建议您查看 Apache Thrift,它支持最常见的语言绑定,并具有您需要的大多数功能。对于您的需求来说,这可能有点过分了,但由于您没有指定它们,我想我应该把它扔掉。
If you do decide you need RPC, I recommend looking at Apache Thrift which supports most common language bindings and has most features you'll ever need. It might be overkill for your needs, but since you didn't specify them, I thought I'd throw it out there.