-
Notifications
You must be signed in to change notification settings - Fork 116
[pubsub] Orbit electron concerns -- clashing ports and repos #104
Comments
this can be achieved by unconditionally connecting to /ip4/127.0.0.1/tcp/4001 -- it'll always work, no matter the mDNS weirdnesses. (did we ever test mDNS on localhost?) |
We definitely have a different bar what is user friendly ;) Valid points re. the demo-esque nature of this build. Making sure it works is not much work, mainly handling errors properly in Orbit.
Even though it's a demo, these kind of configurations don't belong in the UI. I'll see what's the best way and make it a fluid experience so that there's no user configuration required. I'll let you know when these are fixed. |
Re ports in use, you could also try different ports, if one fails to bind. |
I made a commit that (latest pubsub branch):
These steps make it behave nicely and while the user experience is not fantastic, it prevents errors, makes sure the user gets feedback and guides the user to remedy the situation. For the future, to make this (controlling the daemon and error handling) nice, we'll have to fix things in ipfsd-ctl, there be dragons. |
Improved the path and error handling further with this commit: a2256d5 |
Not accidental. Putting the UI build in so that it's quicker to get started (instead of doing 2x npm install & npm run build). |
thanks for improving this 👍 ❤️ |
Improved this further as per our discussion: Orbit now always spawns its own daemon. |
Thanks ❤️❤️❤️
|
I believe these issues were resolved during the time leading up to Devcon2. The fixes are in |
Status quo
current state of
orbit-electron@pubsub
, usinggo-ipfs@feat/pubsub
@0.4.2
or lower,@0.4.3-rc#
,@0.4.4-dev
,@feat/pubsub
}$user/.ipfs
repos at various versions. {1, 2, 3, 4
}orbit-electron
requires using local repo ($user/.ipfs
)orbit-electron
may use localipfs
or its own (i believe as of today it uses its own,go-ipfs@feat/pubsub
}orbit-electron
fails to use the repo (wrong version, locked, etc), the user gets no feedback, only a white screen on startup.orbit-electron
fails to use the daemon, the user gets no feedback (? not sure about this)orbit-electron
go-ipfs daemon fails to bind ports, it will fail, but orbit may still work and use the wrong daemon (no feedback)orbit-electron
uses the daemon but it does not support pubsub, user gets no feedback, but things won't work well (? not sure about this)Which add up to
.app
) to each other, double click, and enjoy".Why all this is big problem
Suggested fixes
Fix1: No clashes (easiest)
Change Orbit to ensure it NEVER clashes with user or system ipfs processes, nor "other people's servers at ports
:8080, :5001, :4001
.This means:
ipfs daemon
and sets them in the ipfs config:8180, :5101, :4101
) -- this may still clash with other services, so orbit SHOULD STILL show an error ifipfs daemon
fails to bind/tcp/0
in the ipfs config addresses, and read the bound ports from the daemon output).app
)$user/Application\ Support
on OSX)Pros:
Cons:
Fix2: User Friendly (harder)
Repo
populated with/Users/myuser/.ipfs
and a help ( ? ) that gives users a bit of necessary context for changing it.IPFS API
populated with/ip4/127.0.0.1/tcp/5001
and a help ( ? ) that gives users a bit of necessary context for changing it.ipfs bin
, a path to the ipfs binary used by Orbit, populated with/path/to/Orbit.app/path/to/ipfs-floodsub
Pros:
Cons:
The text was updated successfully, but these errors were encountered: