gpt4 book ai didi

javascript - 使用 Freedom js 自动发现邻居

转载 作者:行者123 更新时间:2023-12-03 07:37:16 24 4
gpt4 key购买 nike

我正在使用freedom js创建 P2P Web 应用程序。根据他们的文档,他们说:“不需要服务器端代码!”。但是是否存在一种方法来发现新的对等连接和断开连接,以将数据从一个对等点传输到另一个对等点?

最佳答案

嗯,这个答案与更新到2015年9月29日的版本有关。我给店主发了一封电子邮件:

I'm currently wanting to build a simple application on top of freedom js. Could you explain the architecture a little bit?

How are the peers stored? What kind of DHT are you using? Is it similar to a chord? or is it decentralized like bitcoin is?

What I basically want to build is the basics of a p2p app such that, this game can be played by A vs B, where no cheating would occur because the matches are validated by log N neighbors. It would work elimination style.

So imagine a application 1v1 for simplicity sake that was p2p and a million people using it. That means there would be approx 20 levels.

500,000 matches in level 1. 250,000 matches in level 2. 125,000 matches in level 3 . . . . 2 matches in level 18 1 match in level 19 1 winner at level 20

Would this be possible in freedom js?

答案是:

For context, freedom is a library that runs in the web browser of individual users to help with managing a distributed application.

We try to overlay on existing social networks rather than run our own, so this is most relevant when you want something social - users connecting to existing friends by linking the web app go Facebook / Google / etc.

Conceivably you could build a global network for connection on top of a bitcoin like blockchain, but that hasn't been built yet. That seems like the main piece of work needed from a technical perspective. In terms off providing the sort of game experience in browser for a distributed game like this.

总之,尚不可能使用我的问题中发布的指定功能。

关于javascript - 使用 Freedom js 自动发现邻居,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35556175/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com