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

Add daemon mode #11

Open
haadcode opened this issue Nov 13, 2017 · 5 comments
Open

Add daemon mode #11

haadcode opened this issue Nov 13, 2017 · 5 comments

Comments

@haadcode
Copy link
Member

It was suggested in orbitdb/orbitdb#233 that we should have a daemon mode. I think adding that would be awesome!

I reckon we can start by the "daemon mode" being the same as starting a HTTP API that can be used to interact with OrbitDB. I made a skeleton for that in orbit-db-http-server which we could pull into the CLI. Then, add a new command daemon in src/commands that start the http server.

This would be a good task to work on for someone who's looking to contribute to the project and it shouldn't be too complicated.

@dbeecham
Copy link

dbeecham commented Nov 13, 2017

Since we're on github-help-wanted.com, could you give us an introduction to this issue? Starting a daemon mode from a separate cli is a bit unorthodox... Do you start the server in the foreground first, then push it to the background with the cli? Or does the server stay in the foreground, and you start a daemonized HTTP API with the CLI?

edit: ...or do you start the server altogether using the cli?

@haadcode
Copy link
Member Author

Thanks @dbeecham for jumping in! 😄 👍

I was thinking the UX would be, that you start the OrbitDB daemon with the CLI:

orbitdb daemon

The CLI command would start the orbit-db-http-server and once ready, it outputs:

OrbitDB server started at http://127.0.0.1:37373/

It would stay in the foreground and can be stopped with ctrl+c. So essentially the CLI wraps the http-server, ie. the CLI provides a way to start the http server.

What do you think?

@aphelionz
Copy link
Member

@haadcode assign this to me? I'll take a look at this. I enjoy using the orbitdb cli so improving it would be great

@haadcode
Copy link
Member Author

@aphelionz that would be fantastic! 👍I've added you to the collaborators on the project, so you can work directly in the repo.

Heads up though, the code hasn't been updated in a while a you might have to fix other issues like #17 before you can proceed with this. And generally, any refactoring of the code is highly appreciated as you work through it.

@aphelionz
Copy link
Member

@haadcode copy that

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

No branches or pull requests

3 participants