dht

DHT Routing Table - Why use Buckets and not a map?

帅比萌擦擦* 提交于 2019-12-11 06:37:17
问题 Closest question to this I think. One obvious method of structuring a routing table is to simply maintain a literal table. Map(XOR,Node) Kademlia discusses the use of 'Buckets' which are organised by the most significant bit of the XOR. What is the actual purpose of 'buckets'? Why mess around with 'longest prefix' when we can simply hold the 'actual' XOR as a key in a map? Obviously the map could potentially be 2^160 large, but we could use some heuristics to limit the size of the map, rather

Bittorrent KRPC - Why are node ID's half the size of an info_hash and use every character a-z?

随声附和 提交于 2019-12-11 04:58:38
问题 This has seriously perplexed me. The original Kademlia offers that 160bit hex like a sha1 should be used for obvious reasons: When searching for peers relating to an infohash, you simple search nodeIDs as they should be equivalent to the same system as the sha1 infohash. But reading this: http://www.bittorrent.org/beps/bep_0005.html the id's are abcdefghi0123456789 which is: 1) Half the size 2) Uses more characters then standard hex encoding. So what am I missing? Why are node id's like this?

Why does Kademlia use UDP?

匆匆过客 提交于 2019-12-11 02:45:48
问题 Why does the Kademlia Distributed Hash Table use UDP as its network transport protocol, even though it's unreliable? 回答1: The main reason is that you rapidly query many nodes that you have never established contact to before and possibly will never see again during a lookup. Kademlia lookups are iterative, i.e. requests won't be forwarded. A forwarding DHT would be more suited to long-standing TCP connections. I.e. a large chunk of the traffic consists a short-lived exchange of a request and

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

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

Distributed Hashmap in java or distributed information storage

一笑奈何 提交于 2019-12-06 07:30:17
问题 Does someone knows a good java framework for distributed hashmaps (DHT)? Some time ago I worked with Overlay Weaver, but a good documentation is missing here, so I only used it for an prototype with ugly hacks..., but now I need reliable code. Or does someone found a good docu for OverlayWeaver? It would be perfect if the dht framework supports Chord or Kademlia and can be called inside my java application. Or does someone knows a better approach to save reliable and failuresafe short string

Query DHT Server

拜拜、爱过 提交于 2019-12-05 06:49:46
问题 I'm trying to make a simple query to a DHT server. I'm trying to make a simple simple example to test queries to the servers, but I don't get a response from the server in any form... Little example: $socket = fsockopen("udp://router.bittorrent.com", 6881, $errno, $errstr, 3); fwrite($socket, 'p'); $Head = fread($socket, 4); $CheckStatus = socket_get_status($socket); if($CheckStatus["unread_bytes"] == 0) { return 0; } $do = 1; while($do) { $str = fread($socket,1); $stats .= $str; $status =

Adding new nodes to Kademlia, building Kademlia routing tables

安稳与你 提交于 2019-12-03 07:52:50
问题 I can't quite wrap my brain around the joining process of Kademlia DHTs. I've seen a few tutorials and presentations online, but they all seem to say things the same way and all psedo code etc is the same in most (actual copy/paste). Can somebody give a high level walk through on this? 回答1: I'm assuming you've read the Kademlia paper. Here's an excerpt from my article An Introduction to Kademlia DHT & How It Works Some background information: When you have a Kademlia network running, there

The easiest DHT to implement

a 夏天 提交于 2019-12-03 03:45:24
问题 Which Distributed Hash Table (DHT) is easiest to implement in Python? Any good example that is not bloated? I not am looking for a definition of DHT because I am more oriented and focused on design and implementation of such. 回答1: If you are focused on implementation, rather than looking for an out-of-the-box solution, this article might help a bit: http://www.linuxjournal.com/article/6797 回答2: In my job I'm working with entagled. I can't say it's great code, but it seems to be the only

IPFS指令集(二)

匿名 (未验证) 提交于 2019-12-03 00:18:01
6 ipfs cat 用法 使用范例 参数 描述 7 ipfs commands 用法 选项 描述 8 ipfs config -8.1- ipfs config 用法 使用范例 参数 选项 ipfs config”用来控制各种配置的变量。其工作原理类似“git config”。配置参数值存储在IPFS知识库的配置文件中。 例 子 获取“Datastore.Path”键的值: $ ipfs config Datastore.Path 设置“Datastore.Path”键的值: $ ipfs config Datastore.Path~/ .ipfs / datastore 子命令 使用“ipfs config <subcmd> --help”指令可以进一步获取每个命令的更多信息。 -8.2- ipfs config edit 用法 使用范例 描述 -8.3- ipfs config replace 用法 使用范例 参数 描述 -8.4- ipfs config show 用法 使用范例 描述 9 ipfs daemon 用法 使用范例 ipfs daemon [--init] [--routing=<routing>] [--mount] [--writable] [--mount-ipfs=<mount-ipfs>] [--mount-ipns=<mount-ipns>] [-