Giter Club home page Giter Club logo

Comments (7)

vyzo avatar vyzo commented on August 23, 2024 1

It kind of defeats the purpose.
Also note that the address is a very loaded term -- it's not just one, there is a whole slew of them and including them in the pubsub message induces a lot of overhead.
Better to use the DHT, it was designed for this!

from go-libp2p-pubsub.

vyzo avatar vyzo commented on August 23, 2024

You have the peer in the From field of the message, as bytes.

Also see #97

from go-libp2p-pubsub.

upperwal avatar upperwal commented on August 23, 2024

@vyzo thanks for the reply.

Yeah, From only has peer.ID and not the Multiaddr of the publisher.

https://github.com/libp2p/go-floodsub/blob/0827f5e955d17c60f422db92d2536be7598b05a6/pubsub.go#L601-L608

I could not understand the reference to #97. Can you elaborate? Thanks.

from go-libp2p-pubsub.

vyzo avatar vyzo commented on August 23, 2024

Oh, you want the address of that peer?
That is generally not known to the pubsub system, unless it has a direct connection to it.
You may be able to retrieve this from the DHT with FindPeer.

from go-libp2p-pubsub.

upperwal avatar upperwal commented on August 23, 2024

yeah, that can be done. But what would be better

  1. Including publisher's Multiaddr in pubsub message (and increasing the size of flood packets)
  2. Call FindPeer and send a dht query which itself is expensive.

Is this use case (publisher wants to directly connect to the subscriber) even prominent?

Any thoughts @Stebalien @raulk

from go-libp2p-pubsub.

upperwal avatar upperwal commented on August 23, 2024

yeah, agree.

from go-libp2p-pubsub.

Stebalien avatar Stebalien commented on August 23, 2024

Also, we can (and should) have non-DHT peer routing protocols.

from go-libp2p-pubsub.

Related Issues (20)

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.