ipni / caskadht Goto Github PK
View Code? Open in Web Editor NEW:knot: Cascades lookups to the IPFS Kademlia DHT
License: Other
:knot: Cascades lookups to the IPFS Kademlia DHT
License: Other
At the moment neither IPNI nor ipfs/specs#337 support peer record lookups. This means that, assuming no external discovery mechanisms, a peer that relies on this repo for finding a libp2p peer to talk to is going to have a bad time.
While it would be totally reasonable to think because the content routing interface returns a peer.AddrInfo
that it has addresses and you can just pass it right along. Unfortunately, this is not the case. Most DHT server nodes only keep the peer record around and while they'll tell you the multiaddrs for that peer if they know them they may not have them. This is to deal with the fact that, unlike say Filecoin SPs, many clients of the IPFS Public DHT have non-stable IP addresses and so it wouldn't be reasonable to store those addresses for 24 (now 48) hours.
There are two ways to resolve this issue:
FindPeer
to connect to the peer and get their addresses (you can just pull them out of the peerstore)
I suspect that ultimately we will want both 1+2 and that 1 is the option that will move things along faster.
Note: I apologize for not having done this for you in someguy
and even more for not having filed the issue on someguy for discovery purposes. I was expecting to tackle this either when routing.delegate.ipfs.io became a production service and/or when option 2 happened, but neither have occurred yet so here we are ๐
.
flushes will be relatively expensive. we should understand how many packets we're potentially sharding a respond into and try hard to minimize it.
Originally posted by @willscott in #5 (comment)
the current running instance is not reliably serving results quickly due to resource limitations.
Would be great to brainstorm suggestions to do better in the next days.
One naive thought from perspective is to partition instances of this pod by keyspace, such that queries go to one of the multiple replicas, and that replica only needs to stay connected / track a portion of the overall dht peers.
I understand that one of the nice aspects of ndjson is streaming capability, but when reading this line below the README, I was curious what an example response might look like with ndjson and how it will differ from regular JSON (since with ndjson every line still needs to be valid json)
steams the results back over ndjson whenever the request Accepts it or regular JSON otherwise.
Expose HTTP endpoint that given a peer ID , it returns a list of addresses for it.
Note, this requires specification on both IPNI and HTTP delegated routing.
Relates to #9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.