libp2p / go-libp2p

libp2p implementation in Go
MIT License
6.07k stars 1.07k forks source link

Example projects that use libp2p #64

Closed JustinDrake closed 1 year ago

JustinDrake commented 8 years ago

I come from the OpenBazaar project and I am new to go-libp2p and go-ipfs. Are the examples that use libp2p in a production environment? Where's the best place to learn libp2p by example?

whyrusleeping commented 8 years ago

Right now, the only production use of go-libp2p (that i know of) is in go-ipfs. We would love to work with others on helping them use libp2p for their projects too if theres any interest.

JustinDrake commented 8 years ago

Cool. Paging @hoffmabc and @cpacia from the OpenBazaar project that are looking to use go-libp2p in production.

hoffmabc commented 8 years ago

Yep we will be using it.

whyrusleeping commented 8 years ago

@hoffmabc @cpacia I'd love to have a chat sometime with you guys about integrations and work with you to make sure everything goes smoothly. This is very exciting :)

daviddias commented 8 years ago

Adding myself to this thread :) Interested on participating on these conversations.

JustinDrake commented 8 years ago

@whyrusleeping @diasdavid OpenBazaar's current plan is to reuse most of the go-libp2p codebase but make a network fork to allow for longer TTL on certain types of DHT data. What do you guys think? Is a network fork meaninful? cc @cpacia and inviting @michaelfolkson

JustinDrake commented 8 years ago

Forwarding @cpacia's comment from Slack:

The ttl is 24 hours by default. It's too short for the messaging system. That would mean if a message recipient doesn't come back online in 24 hours they wont receive your message. I've changed it to 7 days for message pointers.

Kubuxu commented 8 years ago

I wouldn't use DHT for storing messages hashes, it is too unreliable in my opinion for that purpose (and how do you retrieve message to someone from DHT?), there isn't anything ready for messages yet, but once pubsub is implemented fully if you add OrbitDB to that system similar to patchwork should be quite easy to implement.

whyrusleeping commented 8 years ago

The dht could be used for that just fine i think, you would just need to have both parties online within one TTL of eachother to complete a message pass (once you modify the dht to allow storage of arbitrary non-hash message data, which is pretty simple). You wouldnt necessarily be 'splitting the network' but theres no real worry around a 'network split'

JustinDrake commented 8 years ago

Here's a video that shows what the OpenBazaar team has done so far:

https://www.youtube.com/watch?v=HG1eKf-Aj0o

whyrusleeping commented 8 years ago

@JustinDrake that looks great!

cpacia commented 8 years ago

I haven't modified what type of data is stored in the dht. It's still a provider object (peer id and addresses).

The key is a hash of the (prefix) of the recipient ID and the provider address is the location of the ciphertext encoded as a multiaddr.

The peer ID field in the provider obj is not needed for my purpose so I use it as a flag to identify this provider as a message pointer for the purpose of using a different ttl.

The first 12 bytes are zeros and the remainder is random.

If it finds a provider with peer ID that starts with 12 zeros it applies the 7 day ttl. Otherwise the ttl is left at 24 hours for regular ipfs providers. On Jun 12, 2016 3:20 PM, "Jeromy Johnson" notifications@github.com wrote:

@JustinDrake https://github.com/JustinDrake that looks great!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ipfs/go-libp2p/issues/64#issuecomment-225455169, or mute the thread https://github.com/notifications/unsubscribe/AES8hLrzCRmkm_MzrcRfgoIKcY7ciw2Jks5qLFwUgaJpZM4IzDjR .

zippy commented 7 years ago

Adding myself to this thread as we're going to be using libp2p for holochain (http://ceptr.org/projects/holochain)

bigs commented 6 years ago

would love to get someone to contribute a little blurb to our readme with projects using libp2p

marten-seemann commented 1 year ago

We now have this: https://github.com/libp2p/go-libp2p#notable-users