用于编写 P2P 应用程序的 Python 库/框架

发布于 2024-07-24 08:13:51 字数 1542 浏览 10 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

眼泪淡了忧伤 2024-07-31 08:13:52

我引用 Sun JXTA 页面,日期为 2002 年 12 月,

“ JXTA 项目有一个 Java 参考实现,可从 download.jxta.org 获取,目前正在努力添加其他常见语言的参考实现,包括 C、Objective C、Perl、Ruby 和 Python,尽管 Java 实现是最完整的实现。在 JXTA 协议中,C 实现(可用于 Win32 和 Linux)正在快速接近相同的完整性水平。”

I quote from the Sun JXTA pages which have a December 2002 date,

"Project JXTA has a Java reference implementation available from download.jxta.org, and is currently working to add reference implementations in other common languages, including C, Objective C, Perl, Ruby, and Python. Though the Java implementation is the most complete implementation of the JXTA protocols, the C implementation (available for both Win32 and Linux) is fast approaching the same level of completeness."

小情绪 2024-07-31 08:13:52

您好(来自 Java 2.6 和 2.7 的 JXTA 最后两个版本的领导者),

Python 中没有已知的 JXTA 实现。

如果有人想解决这个问题,应该首先了解 JXTA 2.0 协议。 Scribd 上提供的《Practical JXTA II》一书可以在线阅读,应该有助于理解该技术。

欢呼!

Hi (from the leader of the two last releases of JXTA for Java 2.6 & 2.7),

There is no known implementation of JXTA in Python.

If anyone wants to tackle this issue, one should learn about the JXTA 2.0 protocols first. The Practical JXTA II book available online for reading at Scribd should help understanding the technology.

Cheer!

哭了丶谁疼 2024-07-31 08:13:52

Stackless Python 您可能会感兴趣。

Stackless Python might be of interest to you.

唐婉 2024-07-31 08:13:51

Twisted 几乎是 Python 中与网络相关的所有问题的答案,但您确实必须接受 Twisted 的做事方式。 它本质上不是一个 P2P 堆栈,而是一个事件循环、回调系统和网络框架。

Divmod Vertex 目前尚未维护,几年前我尝试使用它时仍然很粗糙。

CSpace 可能最接近您所寻找的:“一个安全、去中心化、用户对用户的平台通过互联网进行通信。” 它将 P2P 和 NAT 遍历抽象出来,以便您的应用程序可以正常运行,而不是“P2P 应用程序”。

同样,几年前澳大利亚有一个古老的 P2P 系统,名为“The Circle”,完全用 Python 编写,具有安全的 P2P 消息传递、聊天、文件共享和其他功能。 0.41c 是最后一个版本:http://savannah.nongnu.org/projects/circle/

同样来自我的书签:

http://entangled.sourceforge.net/ 是 Entangled,“一个分布式哈希表(DHT)基于 Kademlia,以及点对点元组空间实现。”

http://khashmir.sourceforge.net/ 是一个 Python 分布式哈希表,值得注意的是它使用 Airhook 进行网络连接协议,具有很强的容错能力(设计用于例如通过蜂窝网络使用)。

http://kenosis.sourceforge.net/ 是一个Python P2P RPC系统。

Twisted is pretty much the answer to anything seriously network-related in Python, but you really have to buy into the Twisted way of doing things. It's not intrinsically a P2P stack, it's an event loop, callback system and networking framework.

Divmod Vertex is not currently being maintained, and was still pretty rough when I tried using it a few years ago.

CSpace might be the closest to what you're looking for: "a platform for secure, decentralized, user-to-user communication over the internet." It abstracts the P2P and NAT traversal out so your app can act normally and not be "a P2P app."

Similarly, there was an old P2P system out of Australia called "The Circle" a few years ago, written entirely in Python, which had secure P2P messaging, chat, file sharing and other features. 0.41c was the last version: http://savannah.nongnu.org/projects/circle/

Also from my bookmarks:

http://entangled.sourceforge.net/ is Entangled, "a distributed hash table (DHT) based on Kademlia, as well as a peer-to-peer tuple space implementation."

http://khashmir.sourceforge.net/ is a Python distributed hash table, notable because it networks using the Airhook protocol, which is very fault-tolerant (designed for use e.g. over cellular networks).

http://kenosis.sourceforge.net/ is a Python P2P RPC system.

記柔刀 2024-07-31 08:13:51

当然,我能想到的最佳选择是使用 twisted

旧版本的 BitTorrent 是用它构建的。 该链接是使用扭曲的最后一个已知版本。 您可以将其作为起点进行研究。

还有顶点。 它是一个使用twisted 并允许绕过防火墙的p2p 的库。

Best option I can think, of course, is to use twisted.

Old version of BitTorrent was built with it. The link is to last known version that uses twisted. You can study that as a starting point.

There's also Vertex. It is a library that uses twisted and allows p2p with firewall bypassing.

我不咬妳我踢妳 2024-07-31 08:13:51

自从这个问题被提出并随后得到回答后,ZeroMQ 就出现了,我真的很喜欢它。 Python 模块称为 pyzmq。 它使得构建 TCP 套接字的过程不再那么笨重,尤其是在处理“请求>响应”之外的消息模式时,尽管它也能做到这一点。 它非常适合基本服务器、p2p 应用程序、消息传递、分布式处理等等。

Since this question was asked and subsequently answered, ZeroMQ has emerged, and I REALLY like it. The Python module is called pyzmq. It makes the process building TCP sockets way less clunky, especially when dealing with message patterns other than Request>Respond, though it does that as well. It's great for basic servers, p2p apps, messaging, distributed processing, you name it.

断舍离 2024-07-31 08:13:51

我不知道这样的事情是否存在,但我可以提供以下替代方案:

I don't know if such a thing exists, though I can offer the following alternatives:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文