Blog Posts
- Home /
- Blog Posts
Distributed Transactions in Go: Read Before You Try
In the previous post, I looked into running transactions in a layered architecture. Now, let’s consider transactions that need to span more than one service. If you work with microservices, a time may come when you need a transaction running across them. Especially if the way they are split was an afterthought (the unfortunate but likely scenario). Service A calls service B, which calls service C, and if something goes wrong at the end, the system becomes inconsistent.
Database Transactions in Go with Layered Architecture
As I join a new company, I often feel like an impostor. After all the interviews, they really seem to know what they’re doing. I’m humbled and ready to learn from the best. On one such occasion, a few days in, I dealt with a production outage and asked the most senior engineer for help. They came to the rescue and casually flipped a value in the database with a manual update.
Live website updates with Go, SSE, and htmx
In case you missed the memo, the Single Page Application hype period is over, and we’re now back to PHP and jQuery, I mean rendering HTML on the server. I’m excited! It brings me back to the early 2000s when we were all web developers, not frontend or backend engineers. But there’s one thing I would miss from the SPA era: live updates.
Making Games in Go for Absolute Beginners
Here’s a rant I often see in developer communities: I used to love programming because I like building stuff. But my full-time job killed my passion. I spend more time in meetings, fighting over deadlines, and arguing in reviews than working with code. Am I burned out? Is there hope, or do I need a new hobby? Sounds familiar? No wonder we keep looking forward to using a new framework or database — we’re bored.
Watermill 1.3 released, an open-source event-driven Go library
Hey, it’s been a long time! We’re happy to share that Watermill v1.3 is now out! What is Watermill Watermill is an open-source library for building message-driven or event-driven applications the easy way in Go. Our definition of “easy” is as easy as building an HTTP server in Go. With all that, it’s a library, not a framework. So your application is not tied to Watermill forever.
Watermill v1.2 released
After almost three years since the last stable release, Watermill v1.2 is finally out! If you’re new here, Watermill is our open-source library for building event-driven applications in Go, the easy way. A lot has happened since v1.1. We’ve been running Watermill on production in many projects, using it in new ways and adding features to support new use cases. We also received a lot of feedback and contributions from the community.
The Go libraries that never failed us: 22 libraries you need to know
Did you have a situation when you lost a ton of time finding a Go library for your need? In theory, you can check lists like Awesome Go or make a choice based on GitHub stars. But Awesome Go contains over 2600 libraries, and popularity is not always the best indicator of library quality. I often thought that it would be great to have a place where I could find just the best and battle-tested libraries I could use in my project.
The Best Go framework: no framework?
While writing this blog and leading Go teams for a couple of years, the most common question I heard from beginners was “What framework should I use?”. One of the worst things you can do in Go is follow an approach from other programming languages. Other languages have established, “default” frameworks. Java has Spring, Python has Django and Flask, Ruby has Rails, C# has ASP.
Increasing Cohesion in Go with Generic Decorators
Cohesion is part of the low coupling, high cohesion principle that’s supposed to keep your code maintainable. While low coupling means few dependencies, high cohesion roughly translates to single responsibility. Highly cohesive code (a module or a function) is focused on a single purpose. Low cohesion means it does many unrelated things. I’ve written about coupling in the previous article on anti-patterns.
Auto-generated C4 Architecture Diagrams in Go
Note Hello! Please give Krzysztof a warm welcome in the first guest post on our blog. 🎉 We’ve been working with Krzysztof for the past two years, and we’re excited to share his work here. Miłosz & Robert We all struggle with software architecture diagrams, don’t we? Have you ever wondered why? If you ask yourself that question, why maintenance of up-to-date and detailed software architecture diagrams is so painful, you will come up with a long list of valid answers.
Popular
- The Go libraries that never failed us: 22 libraries you need to know
- Safer Enums in Go
- Common Anti-Patterns in Go Web Applications
- How to implement Clean Architecture in Go (Golang)
- The Repository pattern in Go: a painless way to simplify your service logic
- Introduction to DDD Lite: When microservices in Go are not enough
Tags
- go
- golang
- watermill
- ddd
- domain-driven design
- web-applications
- anti-patterns
- clean architecture
- events
- ci
- firestore
- cloudrun
- gcloud
- googlecloud
- serverless
- advanced
- databases
- devops
- firebase
- gitlab
- microservices
- reactive
- repository
- testing
- architecture
- basics
- building-business-applications
- cqrs
- event-driven
- kafka
- mysql
- nats
- pipelines
- scalability
- transactions
- amqp
- authentication
- backend
- bounded-context
- c4
- cicd
- design-patterns
- diagrams
- docker
- dry
- e-book
- enums
- event-storming
- frameworks
- gamedev
- generics
- google-cloud
- grpc
- htmx
- intermediate
- javascript
- libraries
- maintainability
- metrics
- monolith
- openapi
- prometheus
- python
- rabbitmq
- security
- software-architecture
- sql
- sse
- strategic-ddd
- swagger
- terraform
- tips
- versioning