Posts

Showing posts from September, 2015

On Go, Portability, and System Interfaces

I've been noticing more and more lately that we have a plethora of libraries and programs written for Go, which don't work on one platform or another.  The root cause of these is often the use of direct system call coding to system calls such as ioctl().  On some platforms (illumos/solaris!) there is no such system call. The Problems But this underscores a far far worse problem, that has become common (mal)-practice in the Go community.  That is, the coding of system calls directly into high level libraries and even application programs.  For example, it isn't uncommon to see something like this (taken from termbox-go ): func tcsetattr(fd uintptr, termios *syscall_Termios) error {         r, _, e := syscall.Syscall(syscall.SYS_IOCTL,                 fd, uintptr(syscall_TCSETS), uintptr(unsafe.Pointer(termios)))         if r != 0 {             ...

Announcing govisor 1.0

Image
I'm happy to announce that I feel I've wrapped up Govisor to a point where its ready for public consumption. Govisor is a service similar to supervisord , in that it can be used to manage a bunch of processes.  However, it is much richer in that it understands process dependencies, conflicts, and also offers capabilities for self-healing, and consolidated log management. It runs as an ordinary user process, and while it has some things in common with programs like init, upstart, and Solaris SMF, it is not a replacement for any of those things.  Instead think of this is a portable way to manage a group of processes without requiring root.  In my case I wanted something that could manage a tree of microservices that was deployable by normal users.  Govisor is my answer to that problem. Govisor is also written entirely in Go, and is embeddable in other projects.  The REST server interface uses a stock http.ServeHTTP interface, so it can be used with various ...