p2p

Why does Kademlia structure its routing table how it does?

╄→гoц情女王★ 提交于 2019-12-07 09:23:19
问题 I understand that the Kademlia routing table is made up of 160 buckets. Nodes are put into buckets 0-159, depending on their prefix length (which is the number of leading unset bits in the XOR of the local node key and the node). Why is this so, is there any performance benefits involved (other than the fact that iterating through 160*20 nodes to find the closest is infeasible)?. 回答1: Kademlia uses the XOR of 2 node IDs as a measure of their distance apart. The idea with the routing table

Hole punching using STUN

懵懂的女人 提交于 2019-12-07 08:38:54
问题 I'm currently trying to send UDP messages over the internet and have to set up the firewalls for both endpoints A and B (which are both behind a NAT). To do this, I want to use hole punching using a STUN server. When A creates a request to the STUN server (say, private: 85.1.1.12:6000 and public: 173.194.78.127:19302) I get 85.1.1.12:6000 as a response. If I were to send a packet from the same origin configuration (same origin ip and port that were used for the STUN-request) to any other

Kademlia routing table and distance metric

冷暖自知 提交于 2019-12-07 03:16:32
问题 Its been the first time I read about Kademlia today, and some points I don't think I got them right. The distance between nodes and keys is the xor of their values. So, if I have key x and node y, the distance between them is x xor y. But why what is the point to bucket the nodes I know about and order them by the prefix length ? That doesn't seem to be connected directly with the xor of node IDs to find closests nodes to me ? When I get a request for a value I search in the nodes in the

Does HTML5 Support Peer-to-Peer (and not just WebSockets)

半世苍凉 提交于 2019-12-06 19:53:36
问题 The language I am working in is Javascript on HTML5-compatible browsers. My understanding is that WebSockets require a socket server to transport push notifications and messages back and forth between clients. Is there an actual peer-to-peer capability with HTML5 that does not require a socket server? Has anyone seen example client-side code in Javascript that exemplifies this capability? 回答1: See the answers for Will HTML5 allow web apps to make peer-to-peer HTTP connections? However, the

Simple-peer, Socket.IO, Laravel 5.3

ぐ巨炮叔叔 提交于 2019-12-06 16:17:01
I'm trying to create a video conferencing system using Laravel 5.3, Socket.IO and Simple-Peer. I followed this tutorial : https://www.youtube.com/watch?v=ieBtXwHvoNk and everything worked, but now I want to automatize this. I want that when two users go to this kind of link : /vide-conference/some_video_conference_id, they get connected, so the video conference can begin. As far as I know, if I want a peer to send data to another one before they are connected, I need a signaling server. I'll use Socket.IO. But can you explain me clearly how can I have everything working with Laravel 5.3 ? I

P2P using web browser

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 15:19:49
I've been told that some torrent sites like BITLET or MININOVA allow you to download from other users, and obviously other users to download from you while you have your browser open. I would like to create something similar for a game, where: 1. User A and B are connected to a specific website 2. User A knows the IP and port of B 3. User A starts downloading some information from user B Could anyone give me some tips or keywords to start? Thanks! Your game would have to be written as a browser plugin since browsers don't support this kind of thing. It looks like BITLET uses java, which would

Java: Using server to create P2P between two clients

只愿长相守 提交于 2019-12-06 14:56:52
I am experimenting with a file transfer program in Java and I wanted to create a server that would handle creating P2P connection between two clients. Don't know how that should work, exchanging sockets? I don't want to exchange IP address... Seen some questions similar (ev. Connecting two clients via server java ) but I have no idea how to achieve that. Thanks for your time It sounds like you are looking for nat traversal techniques. There is no single solution because there are many different network setups. Most p2p software employs a combination of different solutions, such as using IPv6

Can P2P be done without port forwarding?

怎甘沉沦 提交于 2019-12-06 14:42:20
问题 I was making a simple file transfer program through IRC and when I was reading up I saw that IRC when sharing a file creates a direct connection between the two users independent of the server (DCC, Direct Client Connect). After searching a while I have found this: Direct Connect and Advanced Direct Connect. None of these pages answer this question that I can't get out of my head: Is P2P data transfer possible without any user doing a special port-forward? An intermediate server which helps

iPhone P2P - is GKSession unreliable beyond 4 peers?

戏子无情 提交于 2019-12-06 13:43:21
问题 Original question: The iOS Developer Library mentions in the Game Kit Programming Guide that The maximum size of a client-server game is 16 players. Does this limitation also apply to P2P GKsessions? This was already kind-of asked here (but from a different angle). Updated question: Is GKSession reliable when more than 4 peers are connected? note: The question was updated based on the response by saulobrito below. Reference: One example of an app that uses a large group of peers connected is

什么是区块链关键技术?掌握区块链需要哪些必备技能?

眉间皱痕 提交于 2019-12-06 12:33:15
一、区块链简介 简单地说,区块链就是一种去中心化的分布式账本数据库。去中心化,即与传统中心化的方式不同,这里是没有中心,或者说人人都是中心;分布式账本数据库,意味着记载方式不只是将账本数据存储在每个节点,而且每个节点会同步共享复制整个账本的数据。同时,区块链还具有去中介化、信息透明等特点。 二、区块链的关键技术 1. 点对点分布式技术(P2P): 点对点技术(peer-to-peer, 简称P2P)又称对等互联网络技术,它依赖网络中参与者的计算能力和带宽,而不是把依赖都聚集在较少的几台服务器上。P2P 技术优势很明显。点对点网络分布特性通过在多节点上复制数据,也增加了防故障的可靠性,并且在纯P2P网络中,节点不需要依靠一个中心索引服务器来发现数据。在后一种情况下,系统也不会出现单点崩溃。 2. 非对称加密技术:非对称加密(公钥加密)指在加密和解密两个过程中使用不同密钥。在这种加密技术中,每位用户都拥有一对钥匙:公钥和私钥。在加密过程中使用公钥,在解密过程中使用私钥。公钥是可以向全网公开的,而私钥需要用户自己保存。这样就解决了对称加密中密钥需要分享所带来的安全隐患。非对称加密与对称加密相比,其安全性更好:对称加密的通信双方使用相同的秘钥,如果一方的秘钥遭泄露,那么整个通信就会被破解。而非对称加密使用一对秘钥,一个用来加密,一个用来解密,而且公钥是公开的,秘钥是自己保存的