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

Discover and use existing ipfs api if available #105

Open
olizilla opened this issue May 17, 2019 · 6 comments
Open

Discover and use existing ipfs api if available #105

olizilla opened this issue May 17, 2019 · 6 comments

Comments

@olizilla
Copy link
Member

Using an in-process ipfs node that's only running for the duration of the install should be avoided if possible. We could check for a repsonsive ipfs api on the default port and use it where available.

@achingbrain
Copy link
Member

Can’t we use MDNS to discover a local node instead of using the defaults?

@olizilla olizilla changed the title Check for existing ipfs api if available at default address Discover and use existing ipfs api if available May 17, 2019
@olizilla
Copy link
Member Author

Good point. Have updated the title to be more about "what" not the "how".

@olizilla
Copy link
Member Author

of note, I think we want to discover an api we can use, not just that there is a node nearby... we could mdns to discover "nodes on this network" but I'm not clear on if it would be a good way to discover "there is a node on this machine with an api you can talk to"

@achingbrain do you thoughts on how it might work?

@fsdiogo
Copy link
Contributor

fsdiogo commented Jun 14, 2019

We should use the ipfs-provider lib to find an available node and use it. If there is none, it can spawn an in-process JS one.

Should we still keep the option to spawn a node using ipfsd-ctl?

@achingbrain
Copy link
Member

We should use the ipfs-provider lib to find an available node and use it

Doesn't look like ipfs-provider does an MDNS query? The only strategies is uses that could succeed here are a preconfigured http api or starting it's own daemon which I don't think gives us anything we don't already have?

I'm not clear on if it would be a good way to discover "there is a node on this machine with an api you can talk to"

You get the hostname/IP address of the advertised service back, if it's a local address it should be game on - is that enough?

@fsdiogo
Copy link
Contributor

fsdiogo commented Jun 14, 2019

Doesn't look like ipfs-provider does an MDNS query?

Yes, it does not.

I've opened PR #113 to clarify my intentions.

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

3 participants