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

Support for js-ipfs #601

Closed
daviddias opened this issue Jan 21, 2018 · 19 comments
Closed

Support for js-ipfs #601

daviddias opened this issue Jan 21, 2018 · 19 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up

Comments

@daviddias
Copy link
Member

When to expect js-ipfs support?

@hacdias
Copy link
Member

hacdias commented Jan 22, 2018

Right now, Desktop uses some endpoints that are not available on js-ipfs yet, such as: repo.stats and stats.bw. And we need MFS working too since the 'Files' pane is going to start using it.

@daviddias
Copy link
Member Author

Will it come on #662 ?

@daviddias daviddias added the P1 High: Likely tackled by core team if no one steps up label Nov 14, 2018
@hacdias
Copy link
Member

hacdias commented Nov 14, 2018

@daviddias nope, not yet. We decided not to have that feature on the first version and keep it as simple as possible. That will be added afterwards. 😄

@phoniks
Copy link

phoniks commented Nov 23, 2018

@daviddias @hacdias What would it entail to enable js-ipfs support exactly? I'd like to contribute if it's something I can tackle.

@daviddias
Copy link
Member Author

daviddias commented Nov 23, 2018

Awesome, thank you for showing up @phoniks :)

js-ipfs exposes exactly the same API that the client lib (js-ipfs-api) for go-ipfs exposes, so it is just a question of spawning the right daemon.

IPFS Desktop uses https://github.com/ipfs/js-ipfsd-ctl/ which gives a way to spawn an js-ipfs node too

I believe the missing piece is the UI parts, which we need a switch to go from go to JS and then back.

@hacdias wanna share some more pointers in the code?

@hacdias
Copy link
Member

hacdias commented Nov 23, 2018

@daviddias @phoniks hey! It is really straightforward to let IPFS Desktop use JS-IPFS. You only have to do three things:

  • npm install ipfs
  • Remove these 3 lines where we explicitly block anything that isn't go.
  • On your config, change type to 'js'.

Why aren't we adding js-ipfs right now? We just want to keep this simple to release v1.0. As you can see by our Release 1.0 issue (#669), we postponed the 'Way to connect to multiple backends' feature. That will allow you to switch between different daemons.

We could add js-ipfs right now, but there wouldn't be anything on the interface to allow you to edit your config. That's something to think about: is it worth it to include js-ipfs for now and only those who know how to activate it will benefit from it? Or wait a bit longer until we support multiple backends and have an interface to pick which one to use.

/cc @ipfs-shipyard/gui

@daviddias
Copy link
Member Author

That's something to think about: is it worth it to include js-ipfs for now and only those who know how to activate it will benefit from it?

Yes, because dogfooding :)

@olizilla
Copy link
Member

Hey, this is great! @hacdias is right, we're focusing on make the new user experience as clear as possible. Desktop is going to be opinionated on what that looks like. But, we can add an option to our brand new settings page that lets you toggle between go-ipfs and js-ipfs, so folks can try out both. It'll need some good copy to explain it.

I'll write up a more specific issue for it and link back to this one. @phoniks I'll tag you on it. If you'd like to work on a PR for it we'll gladly give you pointers.

@phoniks
Copy link

phoniks commented Nov 23, 2018

This absolutely sounds like something I can tackle and I'd be really happy to be able to contribute. @olizilla I'll be on the lookout for that issue. In the meantime, I'm going to follow @hacdias's instructions for enabling js-ipfs just to make sure I can get it running on my machine.

@hacdias hacdias added the kind/enhancement A net-new feature or improvement to an existing feature label Jul 24, 2019
@hacdias
Copy link
Member

hacdias commented Sep 27, 2019

This issue seems quite stale. However, I think that supporting js-ipfs out of the box, or at least with some configuration, is essential. I'm adding this as a feature planned for 0.10.0.

Certainly, this needs to be planned. Right now, we support the most simple setup: one repository with go-ipfs. @alanshaw can you confirm if both js-ipfs and go-ipfs's repositories are compatible with each other?

I see multiple solutions here:

  1. Just add js-ipfs as an alternative to go-ipfs and use the same repository, but with a different implementation.
  2. Have one repository for go-ipfs and another for js-ipfs.
  3. Have multiple repositories, each with a different configuration.

I prefer 1, which is the simplest. Two is quite simple too. I would like to avoid 3 for now: I don't actually see why regular users would want to have multiple repositories on their systems.

@hacdias hacdias mentioned this issue Sep 27, 2019
15 tasks
@daviddias
Copy link
Member Author

@hacdias 1) is the way to go. This work will hopefully pave the path for future implementations to be added as well and create the template in which apps can switch between multiple implementations with low friction.

@alanshaw
Copy link
Member

They should be compatible. We have interop tests to assert that. However, if go-ipfs is using badger datastore js-ipfs cannot use it.

@lidel
Copy link
Member

lidel commented Oct 15, 2019

Note a discussion about switching go-ipfs to badger as the default at some point: ipfs/kubo#4279
For now, on the UX side, ipfs-desktop could detect type=badgerds in repo config and disable option to switch to js-ipfs.

@alanshaw
Copy link
Member

Can't wait for this to land!

@hacdias
Copy link
Member

hacdias commented Oct 18, 2019

An update on this: after our weekly call, we are thinking about releasing this as an "hidden" feature for now: we bundle js-ipfs and by tweaking the configuration file, we are able to toggle between both implementations. For now, it will be helpful to test IPFS Desktop against both implementations and will be useful for the testing part.

@hacdias hacdias mentioned this issue Nov 5, 2019
27 tasks
@pcowgill
Copy link

@hacdias In the meantime, is the best alternative to use the web UI for js-ipfs?

@hacdias
Copy link
Member

hacdias commented Apr 17, 2020

@hacdias In the meantime, is the best alternative to use the web UI for js-ipfs?

Yes, for sure. You can always use the Web UI with js-ipfs without IPFS Desktop.

@pcowgill
Copy link

Yes, for sure. You can always use the Web UI with js-ipfs without IPFS Desktop.

@hacdias Unfortunately that didn't work for me ipfs/js-ipfs#2796

@lidel
Copy link
Member

lidel commented Oct 12, 2020

Since this issue was filled js-ipfs and go-ipfs removed the guarantee of flatfs repo interop,
and js-ipfs is slowly switching focus to web browser contexts.

This means js-ipfs has different strengths and is no longer a drop-in replacement for go-ipfs.
I am closing this, as there is no benefit to the user to use js-ipfs instead of go-ipfs here, and we have no bandwidth for maintaining such thing, even as an experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

7 participants