Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

How to get discovery and PubSub in the browser? #635

Closed
joaosantos15 opened this issue Nov 23, 2017 · 3 comments
Closed

How to get discovery and PubSub in the browser? #635

joaosantos15 opened this issue Nov 23, 2017 · 3 comments

Comments

@joaosantos15
Copy link

joaosantos15 commented Nov 23, 2017

Hello,
My name is João and I'm using IPFS for my M.Sc Thesis (I made a full introduction about myself and my project on ipfs/notes) 😁 .

I am working on a JS application that runs on the browser, where multiple users are able to make claims (json files) about pages listed on the website and then other users can retrieve all the claims made about each page.

My ultimate goal is to have the system being fully decentralized and, for that, one of the first steps I'm taking is storing the claims on IPFS. I've done some experiments using the js-ipfs-api connected to my go-ipfs node because of the need for discovery, which I believe js-ifps does not yet offer. However, I need a way to announce the ipfs links to the claims made about pages, so that other users can retrieve them.

My final solution for this problem is going to be using a blockchain (maybe with the Chainpoint mechanism) to keep a record of the claims, essentially something that matches the IPFS link of the claim to the http-url of the page the claim is about.

In the mean time, for prototyping and testing purposes, @diasdavid , suggested I used the IPFS PubSub (links to the claims would be posted on a topic which would be the link to the page the claims are about and users interested in getting the claims for that article would just subscribe to that topic), but from what I read here the PubSub API only works in a Node.js environment, and I need it working on the browser.

I've seen that js-ipfs PubSub works on the browser, but it lacks the discovery which I also need.

Does anyone have an idea how I can make this work? I've though about using js-ipfs just for the PubSub, to get the ipfs-links and then using go-ipfs (with the js-ipfs-api) to retrieve the files, is this the only way of doing it?

Thanks! :)

@daviddias
Copy link
Contributor

Thanks for the very comprehensive description @joaosantos15 😅

In summary, what you need is to be able to use PubSub in the browser from js-ipfs-api. Did you happen to find this issue: #518? It can be your first contribution, I added a comment to make it clear on what needs to happen #518 (comment).

@joaosantos15
Copy link
Author

Thanks! I'll check it out :)

@daviddias
Copy link
Contributor

Closing this one, let's continue the convo in #518 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants