Month: February 2020
The Zen of Go
This article was derived from GopherCon Israel 2020 presentation. It’s also quite long. If you’d prefer a shorter version, head over to the-zen-of-go.netlify.com.
Advanced Go Concurrency
f you’ve used Go for a while you’re probably aware of some of the basic Go concurrency primitives:
- The
go
keyword for spawning goroutines - Channels, for communicating between goroutines
- The
context
package for propagating cancellation - The
sync
andsync/atomic
packages for lower-level primitives such as mutexes and atomic memory access
These language features and packages combine to provide a very rich set of tools for building concurrent applications. What you might not have discovered yet is a set of higher-level concurrency primitives available in the “extended standard library” available at golang.org/x/sync. We’ll be taking a look at these in this article.
Go: Discovery of the Trace Package
This article is based on Go 1.13.
Go provides us a tool to enable tracing during the runtime and get a detailed view of the execution of our program. This tool can be enabled by flag -trace
with the tests, frompprof
to get live tracing, or anywhere in our code thanks to the trace
package. This tool can be even more powerful since you can enhance it with your own traces. Let’s review how it works.
https://medium.com/a-journey-with-go/go-discovery-of-the-trace-package-e5a821743c3c
The What, Why, and When of Single-Table Design with DynamoDB
Yet data modeling with DynamoDB is tricky for those used to the relational databases that have dominated for the past few decades. There are a number of quirks around data modeling with DynamoDB, but the biggest one is the recommendation from AWS to use a single table for all of your records.
In this post, we’ll do a deep dive on the concepts behind single-table design. You’ll learn: