Decomposing the Database: Achieving Data Independence in Microservices

Overview Chapter 4 of Sam Newman’s Monolith to Microservices tackles one of the most challenging aspects of transitioning to microservices: decomposing the monolithic database. Newman provides practical guidance on managing shared data, splitting schemas, handling distributed transactions, and adopting incremental approaches to achieve database independence. The chapter emphasizes balancing technical complexity with business goals while avoiding common pitfalls. Read Chapter 3 Summary Splitting Databases Incrementally Newman advises against attempting an all-at-once split of the database. Instead, teams should decouple services incrementally: ...

January 6, 2025 · 3 min · 500 words · Hector Yeomans

How to Use GORM and Golang Migrate

Introduction This guide demonstrates how to set up and use GORM with Golang Migrate to manage your PostgreSQL database. Follow along to see the code in action and get your environment running. Prerequisites Go installed on your system. Docker installed and running. Project Structure Here is the final directory structure: . ├── .env ├── Makefile ├── cmd │ └── cli │ └── main.go ├── docker-compose.yml ├── go.mod ├── go.sum └── internal ├── db │ └── migrations │ ├── 20240608192206_create_users_table.down.sql │ └── 20240608192206_create_users_table.up.sql ├── models │ └── models.go └── repositories └── repositories.go 8 directories, 10 files Step 1: Initialize Your Project 1. Initialize the Go module: ...

June 7, 2024 · 4 min · 850 words · Hector Yeomans

Redis, STunnel, and C#

In this blog post, I will try to demonstrate how to setup a working environment with StackExchange.Redis package is communicating to a Redis box using SSL through STunel. By the end of this post, you will have a working environment on Vagrant like this: ...

January 25, 2017 · 7 min · 1295 words · Hector Yeomans