Home

Some insights from GoLab 2019

I attended the GoLab conference in Florence and would like to present some of the topics I took with me.

Dependency Management

A large topic was the handling of dependencies mainly in the context of internal networks. The prerequisite for the presented solutions are Go modules which are activated by default as of Go 1.13 (when there is a go.mod file available in the project root).

Florin Pățan from Jetbrains demonstrated the use of Go modules very well using the development environment GoLand. He also wrote a blog post about it.

Several solutions were presented to load dependencies via a proxy. In some cases they even work in a supplementary way.

Benchmarking

Many of the speakers have presented a number of different ways to debug their applications and identify performance problems.

There are packages which can be used directly from go subrepos to benchmark different ranges.

golang.org/x/benchmarks/build
Build is a benchmark that examines compiler and linker performance.

golang.org/x/benchmarks/driver
Package driver provides common benchmarking logic shared between benchmarks.

golang.org/x/benchmarks/garbage
Garbage is a benchmark that stresses garbage collector.

golang.org/x/benchmarks/http
HTTP is a benchmark that examines client/​server http performance.

golang.org/x/benchmarks/json
JSON benchmark marshals and unmarshals ~2MB json string with a tree-like object hierarchy, in 4*GOMAXPROCS goroutines.

Profiling data can be exposed by an endpoint with the http pprof package. This is very useful to visualize these data directly in the browser or use a cli interface like gom.

Debugging

In some cases you want to know a trace of all calls in your runtime. The runtime package from go provides these capabilities. An interesting article from Dave Cheney explains the details here.

With expvar you are able to extract debug informations from your production (like pprof for performance issues) environment over an endpoint.

A very interesting talk by Fabio Falzoi. A deep insight into garbage collection of Go. He has his slides on github as pdf available.

Webservices

If you run several goroutines in parallel, you can cause conflicts. Roberto Clapis explained how to find the causes and minimize them. To do this, he introduced his debugging methods and helped to understand the problem of contention better. Get the slides here.

Bill Kennedy has introduced a starter-kit for webservices. The focus is on robustness and configuration.

Functional Programming with Go

Last but not least, I would like to mention Eleanor McHugh's talk. She presented exciting implementations to apply functional concepts in Go.