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

Consider switching to .fork() instead of .spawn() #99

Closed
Marak opened this issue Aug 8, 2015 · 2 comments
Closed

Consider switching to .fork() instead of .spawn() #99

Marak opened this issue Aug 8, 2015 · 2 comments

Comments

@Marak
Copy link
Collaborator

Marak commented Aug 8, 2015

.spawn() allows us to run any systems process, like chroot. This is pretty useful moving forward as in the future, we aren't bound to starting a node process. This also forces us to only have access to the stdio streams ( stdin / stdout / stderr ). stderr is currently being overloaded as a one-way message passing channel. It seems to be working.

.fork() only allows us to run a node process, and we get a bi-directional messaging channel to the process. This is nice, because we can use the bi-directional channel for a lot of things. Maybe it's better to not use it and keep it simple. This change would require using something like posix npm module to chroot the node process after it's started. Not sure I like that approach.

Keeping this issue open as reference.

@Marak
Copy link
Collaborator Author

Marak commented Sep 3, 2015

It's also possible to multiplex the streams over STDIO using https://github.com/dominictarr/mux-demux and .spawn()

I got this working a bit locally, but wasn't happy with the implementation.

Might try again at some point in the future. Related: #113

@Marak
Copy link
Collaborator Author

Marak commented Sep 13, 2015

I don't see us switching to .fork() anytime soon.

Closing issue for now.

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

1 participant