Giter Club home page Giter Club logo

caskadht's People

Contributors

dependabot[bot] avatar gammazero avatar hacdias avatar masih avatar web-flow avatar web3-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

caskadht's Issues

No multiaddrs returned from provider record lookups

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:

  1. When you get a peerID without any addresses do a FindPeer to connect to the peer and get their addresses (you can just pull them out of the peerstore)
    • You can use caching here to save on these extra connections. IIRC go-libp2p's peerstore will already do some caching for you here so you can probably pull addresses out of the peerstore if they're there and search otherwise.
  2. Expose a FindPeer HTTP endpoint that nodes can call

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 ๐Ÿ˜….

Accelerated DHT client is CPU bound at load

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.

How the response looks like with ndjson

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 a FindPeer HTTP endpoint

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.