-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support sending files #69
Comments
@youngjoon-lee That would awesome, and a very useful feature for a chat app such as this. If you would like to do this, please feel free to! I had some idea about this myself about perhaps integrating with https://github.com/ipfs/helia as a backend for storing files |
Thank you! I'll share a draft PR with you soon! |
For the sake of simplicity, given that you are already planning to publish to a gossipsub topic, you might as well include the nodes addresses in the announcement, thus alleviating the need for Kademlia and its Provider system. |
Thank you! That’s definitely more efficient. 👍 I have a short question. It seems that the request-response protocol is implemented only in rust-libp2p, not in js-libp2p and go-libp2p. Is the request-response not a part of the official libp2p spec? or is it a deprecated spec? If so, I need to consider using IPFS as @p-shahi suggested above, but I’m not sure if it’s okay to use IPFS in this repo, considering the coverage/purpose of this universal-connectivity topic |
@youngjoon-lee request/response or libp2p + HTTP is an active area of development right now. There is a spec being written: libp2p/specs#508 and some draft PRs in go-libp2p right now. In js-libp2p we have this prototype: https://github.com/MarcoPolo/js-libp2p-fetch Wrt integrating with Helia in this repo: You're right, the goal of this project is to showcase different libp2p transports/connectivity capabilities all in one application. We'll be creating a tutorial that shows how to build it etc: #67 I think adding a Helia integration would be cool, but maybe in a forked repo? |
As far as an example that uses IPFS in a browser to share files, I'm just passing on that there is https://github.com/ipfs-shipyard/ipfs-share-files and there is an issue (ipfs-shipyard/ipfs-share-files#136 ) to move it to Helia. I'm just passing that on as an FYI. |
The For example, soon, there will be out-of-the-box JSON and CBOR support: libp2p/rust-libp2p#3952 The only convention that you need to follow in other languages is to close the stream after writing (both for requests and responses). |
@youngjoon-lee Btw if you're interested in working on this, I think this would be a good project for HackFS our upcoming hackathon: https://ethglobal.com/events/hackfs2023 |
Thank you! I will |
Hi all,
Thank you for making this repo. It’s super helpful to understand how to configure nodes for each programming languages and to see the current state of libp2p connectivity.
If I’m allowed, I would like to try to implement the file-sharing feature using the request-response protocol. The file-sharing example is already presented in the rust-libp2p repo, but it would be meaningful to implement it in this repo using multiple programming languages.
I’m thinking about the following scenario.
FileAd(name)
via gossipsub.FileAd(name)
message, execute the Kademlia get-provider operation. After getting the provider information, it sends a file request to Browser A by its relay address. Until the file is delivered, web UI just shows a temporary message box:Receiving a file
.I’m not sure if this scenario will work, but I think it’s worth trying, if I can have a chance to do it.
The text was updated successfully, but these errors were encountered: