

A depiction of an instance of Forum message distribution is shown in Figure 1. Messages for a given topic is shared amongst networked peers in the same way. The peers who subscribe to the topic then distribute it to peers they are directly connected to and so on. Once a topic is published by a peer, it is shared to all peers directly connected to the peer. The distribution of topics and messages in Forums are done through the synchronisation of Forum data between RS peers. The interesting bit about RS Forums is how topics are published, administered and distributed among peers. Like web forums it allows users to post a topic and, users to subsequently post messages about the topic (which are called threads). Retroshare’s Forums is a decentralised message distribution service which bares many similarites to the more familiar web forum. I am going to describe Forums, one of Retroshare’s most used service. Firstly if you are an RS user, hope you are loving the software, and if you are not, really do give it a try. More nodes means less volatile DHT, which is a good thing.This is my first blog as part of the Retroshare (RS) development team. If anything, this is giving the bittorrent DHT more nodes which will keep a copy of the routing table for the keyspace of the DHT bucket they're in. After a few hops you will find the node you want.īittorrent nodes think the RsDhtHash is a fileInfoHash, they don't mind. If you have a hash, the nearest node to you can direct you to a node that it knows is 'closer' to the node you want. You call find_node(RsDhtHash) until you find the node which is handling that RsDhtHash.One of the system properties of a DHT is distance based hash lookups. When you follow up with announce_peer(fileInfoHash, token) the node will create a new entry fileInfoHash.īy using the RsDhtHash I mentioned for point 2. When you find the node that should be handling the fileInfoHash and you call get_peers(fileInfoHash), if the node has no entry for that fileInfoHash then you are the first to request that torrent. The node doesn't write any specific value it's told, it will only write your ip:port.Ĭreating a new key:value entry in bittorrents DHT: The node remembers the token and your IP from your get_peers request and appends your ip:port to the value part of the key:value. you then call announce_peer(fileInfoHash, token) to say that you're downloading the torrent, and that the node should add you to the peers list. that node records your IP, and returns a token to you along with the get_peers result you call get_peers(fileInfoHash) on that node you find the node your fileInfoHash is on To write to the value of a key:value in bittorrents DHT: Retroshares DHT and bittorrents DHT are one and the same.īittorrent only supports the following calls: It's storing an RsDhtHash with a single ip:port instead of a fileInfoHash and multiple ip ports. Craig RedCraig Posts: 2 Joined: Sat 10:18 pmįirst of all, retroshare is using bittorrents DHT. I feel like I'm missing a few key pieces of information in how bittorrent and retroshare use DHTs, and how DHTs work in general. If using the bittorrent mainline DHT and Retroshare writes data to it, how can other connecting retroshare peers find the retroshare data in the DHT amongst all of the other bittorrent data? What does retroshare store instead of the fileInfoHash?ģ. When connecting to peers the connecting peer gets information on all other peers in the bucket, and also gets a copy of all of the key:values in the DHT. Retroshare leverages bittorrents mainline DHT to bootstrap itself. Is it possible to write data to the DHT that retroshare is using, which is not peer info ip:port?Ģ. I've been looking through bitdht code, but there are some aspects of DHTs that I still don't understand.ġ. I've read all of the reference material listed here: If that's not possible, then I would look at creating my own DHT which I can write the data to (if that's possible!).

I'm looking at adding some functionality to Retroshare which involves using the DHT to store information other than peer ip:ports in the value part of the key:value in the DHT. I have some questions which I was hoping someone could help me with.

I'll share the information here later today (when I get home from work ). UPDATE: I've actually been in touch with drbob who very helpfully answered my questions.
