python - PyRo 和 RPyC python 库的优缺点是什么?

标签 python distributed pyro rpyc

我正在寻找 Python 的远程过程调用引擎,我发现 PyRo (Python Remote Object)RPyC (Remote Python Call) 都是我正在寻找的东西。

但是,我很想知道它们之间的比较以及它们的优缺点是什么?

最佳答案

我个人认为它们大致相同,但 RPyC 的作者 ( here ) 声称更简单(也许对于不是所有使用分布式计算的人来说,他说的有道理;我可能已经习惯了,无法做出正确的判断;-).引用他...:

although PYRO has a long list of considerable projects in its resumè, I find setting up a server too complicated, if you take into account the amount of code needed, registering objects, running name servers, etc. Not to mention the number of different concepts you have to consider (events, rebinding, with or without name servers, proxy vs. attribute-proxy, names have to be unique, etc.). And it's limited (remote objects must be picklable so you can't work with remote files, etc.). All in all, PYRO has too many special cases and is generally too complicated (yes, I consider this complicated). So of course I'm not an independent reviewer -- but judge for yourself. Isn't RPyC simpler and cleaner?

另一方面,PyRO 确实尝试提供一些安全性(RPyC 的作者声称无论如何都太弱了,并且是 PyRO 声称的许多并发症的基础)。

David Mertz 提供了一个更独立的声音 here对 RPyC 的一个很好的解释(PyRO 已经存在了很长时间,David 指出了之前介绍它的文章)。 “经典模式”是完全通用和简单的零安全部分,“与 Pyro 基本相同(没有 Pyro 的可选安全框架)”; “服务模式”更安全(默认情况下禁止所有未明确允许的内容),并且 David 说,“服务模式本质上是 RPC(例如 XML_RPC),模数调用约定和实现的一些细节”。对我来说似乎是一个公平的评估。

顺便说一句,我不是特别喜欢单语言 RPC 系统——即使 Python 满足了我 99% 的需求(而且还没有那么高;-),我喜欢这样一个事实,即我可以使用任何语言来剩下的 1%...我不想在 RPC 层放弃它!-) 我宁愿做,例如JSON-RPC通过this模块,或类似的...!-)。

关于python - PyRo 和 RPyC python 库的优缺点是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1410328/

相关文章:

python - 如何使Fastapi文档与Aks中部署的Docker容器一起工作?

python - 将 dask 数据帧写入一个文件

java - Infinispan分布式任务执行

configuration - 向我们的服务器添加集中配置

python - Pygame 的网络支持

templates - 如何将javascript脚本链接包含到pyroms页面?

Python 正则表达式匹配上一组中的匹配项(多选 1)

python - Python中object的__hash__()和__eq__()的源代码是什么?

distributed - 提高 bigint 写入磁盘性能

html - 如何在 PyroCMS 中显示来自用户模块的图像?