orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 116 forks source link

[pubsub] Orbit electron concerns -- clashing ports and repos #104

Closed jbenet closed 7 years ago

jbenet commented 7 years ago

Status quo

current state of orbit-electron@pubsub, using go-ipfs@feat/pubsub

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:

Pros:

Cons:

Pros:

Cons:

victorb commented 7 years ago

@haadcode I'm happy to help out with these if we can make a bullet list and I'll take some of the tasks, assuming this is something that needs fixing before devcon @jbenet

ghost commented 7 years ago

does not use people's local ipfs repos for content (note: not a problem if they user's ipfs daemon is running, because in that case Orbit's ipfs node will connect to user's ipfs node and get the content locally.

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?)

haadcode commented 7 years ago

Fix2: User Friendly (harder)

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.

Easiest way to do this is two fields to the Orbit splash screen.

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.

dignifiedquire commented 7 years ago

Re ports in use, you could also try different ports, if one fails to bind.

haadcode commented 7 years ago

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.

haadcode commented 7 years ago

Improved the path and error handling further with this commit: https://github.com/haadcode/orbit/commit/a2256d5dec2e8a2363e3d1b8d54e43b15b2e3803

victorb commented 7 years ago

@haadcode not sure if it's accidental or not, but a2256d5dec2e8a2363e3d1b8d54e43b15b2e3803 contains code outputted from build in client/dist/

haadcode commented 7 years ago

not sure if it's accidental or not, but a2256d5 contains code outputted from build in client/dist/

Not accidental. Putting the UI build in so that it's quicker to get started (instead of doing 2x npm install & npm run build).

jbenet commented 7 years ago

thanks for improving this 👍 ❤️

haadcode commented 7 years ago

Improved this further as per our discussion: Orbit now always spawns its own daemon.

jbenet commented 7 years ago

Thanks ❤️❤️❤️ On Fri, Sep 16, 2016 at 5:47 AM Haad notifications@github.com wrote:

Improved this further as per our discussion: Orbit now always spawns its own daemon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/haadcode/orbit/issues/104#issuecomment-247560967, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIcoQLaO1Hbq15-87NF3M6Eppapc1Q9ks5qqmWpgaJpZM4J8C-k .

haadcode commented 7 years ago

I believe these issues were resolved during the time leading up to Devcon2. The fixes are in devcon2 branch and will be merged to master along with all the other improvements and new features. If you experience more "smoothness" issues, please open a new issue. Thank you all for the testing and work you did for this! <3