Live and Let Die
Hybrid Meetup #50 took place 2025-04-29 19:00 at Basislager Leipzig and we had an insightful presentation on How a Go project dies; lessons learned, challenges to revive it and the scars I got on the way.
Leandro tooks us on a journey into the postfix mail transport agent (MTA) monitoring project controlcenter, written in Go, how it started and factors that contributed to its stalling. The company around it, Lightmeter, was part of the YC-W22 batch, and covered by heise.de, Forbes, NGI and others.
The slides can be found here:
Selected takeaways
- Monoliths are still ok!
- A monolith can look like a set of microservices too; with one database per component and intra-process communication through channels
- Reusability as beneficial emergent property – and not a goal in and of itself
- Parsing postfix logs can be a challenge (cf. “A User-Extensible and Adaptable Parser Architectur")
- Controlcenter took inspiration from Apple’s Grand Central Dispatch for handling concurrency and taking advantage of multicore machines in the presence of limitations (e.g. usually, SQLite allows at most one writer to proceed concurrently) (docs)
- Sqlite3 does not implement stored procedures, but it has application defined functions; with the Go sqlite3 wrapper, you can use RegisterFunc to blend Go and SQL
- The universe of possible postfix setups is huge, and it is impossible to anticipate the layout of all log lines the application would ever encounter; use a crash-first approach to iterate; implemented with a custom assertion package (since Go does not have assertions); telemetry would help to learn about usage in the wild, but users may not support it
- Early returns, or guard clauses, or the left-hand rule can lead to else-less code – also also avoid the arrow anti-pattern
- Controlcenter decided against ORM: tighter coupling, but less complexity and more transparency
- Unfortunately, great software with users does not automatically translate to a product with customers
The open source project is looking for contributors. If you are into mailops, then please take a look at controlcenter repository.
Misc
- Google tried out to a monolithic microservice approach with the now discontinued Service Weaver:
Under the covers, Service Weaver will dissect your binary along component boundaries, allowing different components to run on different machines. – docs
Reflected upon also in Modular Monolith: Is This the Trend in Software Architecture?; cf. Back to the Future: From Microservices to Monolith.
- Go has an a bit unusual set of ORM libraries: classical ones like GORM, more code-generation oriented ones like sqlc or ent; fluent query builder, like bob, or thin wrappers, like sqlx; generic goe and more
- Object-relational mapping works best until it does not
- The Go project added telemetry and made the case that open source projects can benefit from telemetry, and that telemetry can be implemented sensible, too; Russ Cox has written about Transparent Telemetry as well
- Hosting an email server yourself is not too complicated (cf. mail-in-a-box), but there is a risk being blacklisted and then miss out of important messages
- If you run your own email server, you may receive less spam
- NGI (Next Generation Internet) is a European Commission initiative to support European digital sovereignty. They have open calls to support projects in different areas. There’s a similar, smaller scoped fund in Germany, Prototype Fund.
- Is email dead? Hint: while you read this blog post, the world moved 115,403,640 (legitimate) emails forward.
Thanks again to Leandro for the talk and insights!
Join our meetup to get notified of upcoming events.