Category: Architecture
-

The Saga Pattern: Managing Distributed Transactions Without Losing Your Mind
Imagine it’s Friday. 4:15 PM. You’ve just deployed the new “Order-to-Delivery” microservice flow. Service A calls Service B, B calls C. It’s elegant. It’s “decoupled.” You go home and feel like a cloud-native architect. Then, at 2 AM, the pager goes off. A customer bought a $2,000 espresso machine. Service A created the record. Service…
-

Why You Should Never Use Floating Point for Money
After years of maintaining legacy systems, I have seen more bugs caused by improper currency handling than by actual logic errors. Floating-point arithmetic is designed for scientific calculations where precision is secondary to range, making it fundamentally unfit for financial systems. When you use float or double, you are essentially gambling with rounding errors that…
-

Optimizing Search Performance with CQRS: Relational Writes and NoSQL Reads
Most developers start with a single relational database. It works well until your search requirements grow beyond simple primary key lookups. Once you introduce complex filtering, full-text search, and high-concurrency read patterns, that ACID-compliant relational engine starts to crawl. The solution isn’t a bigger server — it’s a different architecture.
-

Granular Authorization in Spring Boot: Beyond Role Checks
Picture this. You were planning a beautiful day, but your product manager sprints to your desk at 9 AM. There’s a “minor” data leak. A junior accountant in the Berlin office just discovered they could view the CEO’s payroll details by changing a userId in the URL. You look at the code. There’s a glorious,…
-

Event-Driven Architecture with Spring Boot and AWS EventBridge: Escaping the Distributed Monolith
Most microservice migrations just trade a local monolith for a distributed one. This post covers how to implement Event-Driven Architecture with Spring Boot and AWS EventBridge — from choreography patterns and schema contracts to idempotency and distributed tracing.
-

The Command Pattern in Java: Eliminating Fat Service Classes with Commands and Handlers
Fat Service classes are a liability — one class that does everything is a class that’s impossible to test and dangerous to change. This post shows how to apply the Command pattern in Java using Records, Repository interfaces, and single-responsibility Handlers to keep your business logic clean and isolated.
-

The Microservices Tax: Why Your Distributed Architecture is Failing You
Stop treating microservices like a trophy and start treating them like a tax. While we are told they decouple teams and improve scale, most developers are simply trading code complexity for unreliable network calls and distributed data corruption. If you can’t maintain clean boundaries in a monolith, moving to microservices will only result in a…
-

The Singleton Delusion: Why Your Implementation is Probably Broken
Most developers treat the Singleton pattern like a relic from 2010—something they “know” but haven’t actually audited in years. We’ve been conditioned to believe Singletons are “evil” or “hard to test,” leading to a trend of pulling in massive Dependency Injection frameworks just to manage a single Logger instance. This resume-driven development adds unnecessary bloat…
-

Layered Architecture in Java: A Practical Guide to Keeping Your Code Clean
The post emphasizes the importance of structured programming to avoid spaghetti code, advocating for a layered architecture. It delineates three layers: Presentation, Business, and Data layers, each with distinct responsibilities. Defining a clear structure early in project development facilitates effective teamwork and ensures scalable, maintainable applications by keeping concerns separate.
-

Architecture, DevOps and Security: The 3 Pillars to Grow A Product
A company’s success hinges on its product, which requires strong architecture, DevOps, and security from the start. Neglecting these areas leads to chaos and difficult scaling. Automating processes and maintaining security standards are essential for efficient growth. Investing in these pillars prevents costly issues, ensuring a healthier product lifecycle and company sustainability.
