Skip to main content

Posts

Showing posts with the label Distributed Systems.Software Architecture

Spring Boot JPA Entities, Flyway Migrations & Spring Data Repositories — The Database Layer Done Right (Episode 5)

There is one line in almost every Spring Boot tutorial that runs flawlessly on your laptop and slowly corrupts your database in production: spring : jpa : hibernate : ddl-auto : update # works on your laptop, quietly rewrites prod With ddl-auto: update , Hibernate looks at your entities on every startup and alters the live schema to match them. No migration file. No version. No review. No rollback. Two developers add different fields, deploy in a different order, and now staging and production have quietly diverged — and the day one of those "updates" needs to drop a column, Hibernate will happily take your data with it. In Episode 5 of Building Instagram's Authentication Backend , we do the opposite. The database is not something Hibernate improvises at boot — it is a versioned artifact, checked into git, owned by Flyway . We build the persistence layer in three deliberate steps: the SQL migration , then the JPA entities , then the Spring Data r...

Top Backend Anti-Patterns That Kill Scalability

Scalability issues usually do not appear on day one. Most backend systems work perfectly fine with low traffic. The problems start  when users increase and data grows . In many cases, the system fails not because of traffic, but because of  bad backend design decisions made early . These decisions are called  anti-patterns . In this article, we will cover the  most common backend anti-patterns  that silently break scalability, explained in simple language with clear reasoning. Before starting interview preparation, it’s important to follow a structured  Java backend developer roadmap  so you don’t miss core fundamentals. Java Backend Developer Roadmap 2026 1. Turning Microservices Into a Distributed Monolith What Goes Wrong Teams break a monolithic application into multiple services and call it “microservices”. However: All services share the same database Services cannot be deployed independently One service failure affects others This is not real mic...