Conversation
dht_net.go
Outdated
| return nil | ||
| } | ||
|
|
||
| func (dht *IpfsDHT) getHost() host.Host { |
There was a problem hiding this comment.
not needed? has the same visibility as the host property. this is also a weird file for it; would expect generic accessor in dht.go if needed.
dht_net.go
Outdated
| return ms, nil | ||
| } | ||
|
|
||
| type protocolSender interface { |
There was a problem hiding this comment.
is this only used for the NewStream construction below? if so, might be easier to set the interface to a function returning a stream given a peerID?
nesting.go
Outdated
| @@ -0,0 +1,175 @@ | |||
| package dht | |||
There was a problem hiding this comment.
can this be in a sub-package like Dual?
|
@willscott if you rewind a commit everything looks much cleaner (it was in a separate package and all the grossness related to the transfer protocol disappears). The recent grossness was added in order to be able to run as a server in the inner DHT, but be a client on the outer DHT. After talking with @Stebalien earlier today we decided that it was reasonable to insist that any inner DHT server would also be an outer DHT server. I'll ping you when the next draft is done, it'll look much better. |
|
@aschmahmann Which issue is this for ? |
@aarshkshah1992 I filled in some text above, it's for #616 |
… while the inner one runs in server mode
…rver of the inner dht and a client of the outer dht from the nesting dht.
This is an attempt at #616.
The basic idea is to utilize DHTs where it is assumed that DHT A is a subset of DHT B and therefore be able to start a query in DHT A and finish it in DHT B without needing to restart the query.
While the bare bones of doing this for
GetClosestPeersis quite straightforward, unfortunately it's a bit of a pain to implement this for all of the Router interface functions (e.g. FindProviders, PutValue, etc.). Very much a WIP right now, that would obviously be much easier if all the routing interfaces where taken care of by #584.