-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to persist and load peers to/from JSON #4
Comments
Context: Distributed web not ready for Runet cutoff from the Internet BitTorrent clients solve this by dumping all the working DHT nodes it has connected to a file. On startup, the client tries to connect to previously seen DHT nodes and only uses the centralized bootstrappers as a fallback if none of the previous DHT nodes are still reachable. This introduces diversity in the network and reduces its dependency on centralized [blockable] infrastructure. This approach also reduces load on the bootstrapper servers as only new clients will need to connect to them. It also slightly improves client security as they don't reach out to domains that may be monitored more often than necessary. I'm not aware if BitTorrent clients try to rank which DHT nodes are most stable and prioritize connections, or if they just begin randomly reaching out to all the previously seen nodes. |
The bittorrent-dht module has a toJSON method that dumps the state of the known nodes and values. Maybe the same thing could be adopted? Would a PR be welcome? |
PR very welcome
…On Thu, 14 Feb 2019 at 17.52, RangerMauve ***@***.***> wrote:
The bittorrent-dht module has a toJSON
<https://www.npmjs.com/package/bittorrent-dht#arr--dhttojson> method that
dumps the state of the known nodes and values. Maybe the same thing could
be adopted?
Would a PR be welcome?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAW_VYQgZhKl-O0OhFk_Sr8akttJzOgPks5vNZRjgaJpZM4a7_L2>
.
|
I am wondering if a level-db would be more suitable for this? |
Does this need to be implemented in this DHT or in the DHT in |
@aureooms dht-rpc needs a way to import an array of nodes and export. the export you can already do with |
Should We could also have a more complex logic where we store other properties (ids, tokens, and whatnot) and import all of that. Then directly import them through calls to |
True you can use the bootstrap option, but option 2 is better, as it can then fall back on the bootstrappers if all nodes are failing. the |
I opened holepunchto/dht-rpc#21 to continue this discussion if this needs to be implemented in |
|
For persistence that's something we should discuss in hyperdrive-daemon (in the hyper case) |
As discussed on IRC, Russia is going to play around with closing it's network off from the rest of the internet.
This could kill Dat applications by blocking the DHT bootstrap nodes.
A good step would be to support persisting known nodes to help bootstrapping, and to account for scenarios where the bootstrap nodes aren't accessible.
The text was updated successfully, but these errors were encountered: