Skip to content
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

implement publishing using libp2p-js in browser without a pubsub provider #29

Open
estebanabaroa opened this issue Dec 19, 2023 · 2 comments
Assignees

Comments

@estebanabaroa
Copy link
Member

the browser should try to first publish p2p if it can, if it can't then it should try the pubsub providers. we need to test how fast/slow this is, if it's too slow, maybe we use the pubsub providers first, and then if they fail we fallback to p2p

@Rinse12
Copy link
Member

Rinse12 commented Jan 3, 2024

Is the code for this feature ready?

@estebanabaroa
Copy link
Member Author

I believe we can use this code to publish using libp2p gossipsub in the browser https://github.com/estebanabaroa/pubsub-test/blob/master/demo5.js

the only settings difference is we would use the default ipfs.io bootstrap nodes I think, or possibly our own nodes as bootstrap.

you first need to instantiate a libp2p instance like in the demo, then you pubsub.publish/subscribe, it's pretty easy

not sure how we would test the speed in production? maybe add some temporary experimental flag like PlebbitOptions.browserLibp2pJsPublish = true or something?

@Rinse12 Rinse12 self-assigned this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants