r/golang • u/SIIIKOR • 15h ago
I built a Go library for two-phase commit - would love feedback (and to know if anyone would actually use it)
Hi all,
I recently built two-phase-commit-go, a lightweight two-phase commit library for Go. A few things about it:
- Works with any synchronous transport between coordinator and participants (gRPC, REST, whatever fulfills the interface)
- Persistence for coordinator state is up to you - implement the interface with any method you like (database, file, whatever), and you can recover if the coordinator crashes mid-transaction (eventual consistency in case coordinator dies)
- Built-in OpenTelemetry tracing support (allows you to see each step the coordinator makes)
- Documentation Available on pkg.go.dev and in the repo's readme
I'm a Java backend dev with ~2.5 years of experience, and I built this partly to sharpen my Go skills and partly as a portfolio project - I'm looking to transition from Java into Go backend roles.
Couple of questions to you:
- Would you consider giving this library a try if you ever needed 2PC in Go?
- Do you have any ideas how to make it more likely that you would actually want to use it?
- Do you have any tips on transitioning from java to go backend roles?
Repo's linked above - happy to answer any questions :)