The Discipline of Chaos Engineering (Gremlin)

Big Oh!

You worked hard to save a few CPU cycles in the central loop, but your code is still slow? Time to think about the time complexity of your algorithm.

Multi-stage Dockerfile for Golang application

A common workaround for building Golang application in Docker is to have 2 Dockerfiles - one to perform a build and another to ship the results of the first build without tooling in the first image. It called Builder Pattern.

Useful Git global config and ignore rules

I am working with git every single day, from different machines and accounts. And all these hosts have the same global git configuration. I sync it using tiny bash script.

70% cheaper Kubernetes cluster on AWS

We are running Kubernetes on both sandbox and production for some months now. Our production cluster is still small, with few services running on it, but, most of our sandbox environment is running on a Kubernetes cluster on AWS. We created the clusters with Kops (which is great...

Different ways to block Go runtime forever

The design of Go’s runtime assumes that the programmer is responsible for detecting when to terminate a goroutine and when to terminate the program. Normally, a program can be terminated in a normal way by calling os.Exit or by returning from the main() function. There are...

There's nothing like a good spike

Go Protobuf Tips

I’ve had my fair share of dealing with proto files in go (and to some extent JS), so I thought I’d share some stuff I’ve learnt the hard way by working with proto files. Protoc include paths The protoc include paths can be pretty confusing, so I’ll give a...

GopherJS Client and gRPC Server - Part 4

Putting it all together As we touched upon earlier, we generate a package from the generated JS (meta, right?), which can be served from the server. We’ll create a new file, main.go, in which we can spin up a server, serve the frontend and the gRPC backend. Much of the logi...

Writing CLI applications with Golang

Last few months I’ve been using Go to write quite a lot of tools. In this post I intent to show not why I chose Go over others, but how I architect those tools, what libraries I use and what kind of automation I have in place. Libraries I’m sure some folks will preffe...