File IO is a really subtle problem and something that might be going away
in the future, but currently Go only uses select/epoll/kqueue on sockets,
not on files. If you want to capture the Stdout or the Stderr of a process
started from Go, you need to pass file handles to it (os/exec does this
under the hood[1]) and start a goroutine which reads from the file handle
and copies the data back into the io.Writer (e.g. bytes.Buffer) into which
you capture the data. This means having a goroutine stuck with an io.Copy
call. Due to the way syscalls are implemented in Go, each read() will block
an OS thread (not a goroutine!) for as long as the process is running. This
means that managing N processes will require at least 2*N OS threads.
Unfortunately, Go does not have any means to tell if a read() will block,
so the only choice is implementing AIO in C and using that.
As for the curl piped into sh install instructions, I guess is a matter of
opinion. I do think it would be irresponsible and I would never install it
that way in a production server, but it's very handy for a development VM,
which most people are using these days. At the end of the day, this is a
developer's tool, so I think that documenting all available install methods
and trusting each user to judge what's better for them is good enough in
this case.
[1] http://tip.golang.org/src/os/exec/exec.go#L221
On Thursday, October 16, 2014 5:25:12 PM UTC+1, Caleb Spare wrote:
Hi Alberto,
governator is written in Go and uses asynchronous IO to avoid keeping an
Why is this a problem?
Personally, I find that having the runtime manage epoll/kqueue for me and
exposing a blocking interface on top is one of my favorite parts about Go.
It's hard for me to believe that there are tangible benefits for
implementing your own async I/O in this context.
Additionally, this is an anti-pattern IMO:
curl -s http://governator.io/install.sh | sudo sh
I tend to mistrust projects that promote such an insecure installation
method (not even over https!).
Other than this, governator looks like a simple and easy-to-use process
manager, and I like the thorough documentation. I'm currently happy with
runit for this niche, myself.
My 2 cents.
-Caleb
On Thu, Oct 16, 2014 at 8:55 AM, Alberto García Hierro <
[email protected] <javascript:>> wrote:
--Hi Alberto,
governator is written in Go and uses asynchronous IO to avoid keeping an
OS thread for every managed
process. As far as I know, this is the only process manager written in Go
which does not have that problem.
process. As far as I know, this is the only process manager written in Go
which does not have that problem.
Why is this a problem?
Personally, I find that having the runtime manage epoll/kqueue for me and
exposing a blocking interface on top is one of my favorite parts about Go.
It's hard for me to believe that there are tangible benefits for
implementing your own async I/O in this context.
Additionally, this is an anti-pattern IMO:
curl -s http://governator.io/install.sh | sudo sh
I tend to mistrust projects that promote such an insecure installation
method (not even over https!).
Other than this, governator looks like a simple and easy-to-use process
manager, and I like the thorough documentation. I'm currently happy with
runit for this niche, myself.
My 2 cents.
-Caleb
On Thu, Oct 16, 2014 at 8:55 AM, Alberto García Hierro <
[email protected] <javascript:>> wrote:
Hi,
Today we're releasing our internal process manager, named governator.
governator is not a replacement for init, upstart or systemd. It's
designed to run and manage programs
developed by yourself, since it provides very useful features for that
use case, like automatic restarts,
watchdogs and logging.
governator is written in Go and uses asynchronous IO to avoid keeping an
OS thread for every managed
process. As far as I know, this is the only process manager written in Go
which does not have that problem.
For installation instructions and documentation, please see
http://governator.io.
Regards,
Alberto
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected] <javascript:>.
For more options, visit https://groups.google.com/d/optout.
Today we're releasing our internal process manager, named governator.
governator is not a replacement for init, upstart or systemd. It's
designed to run and manage programs
developed by yourself, since it provides very useful features for that
use case, like automatic restarts,
watchdogs and logging.
governator is written in Go and uses asynchronous IO to avoid keeping an
OS thread for every managed
process. As far as I know, this is the only process manager written in Go
which does not have that problem.
For installation instructions and documentation, please see
http://governator.io.
Regards,
Alberto
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected] <javascript:>.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.