Tag: Architecture
All the articles with the tag "Architecture".
-
Why You Cannot Simply Add a Second Instance to an In-Memory Pool
A second reputation-pool-cloud instance can grant the same resource twice, issue colliding JVM-local fencing tokens, and overwrite another instance's whole-snapshot checkpoint. This is a deterministic counterexample derived from the current code, not an observed production incident. The article traces the scope of leases, snapshots, memory budgets, and rate limits, then compares tenant sharding, externalized state, and a single writer.
-
Separating the Core from SaaS Revealed a Missing Boundary
How reputation-pool separated a JDK-only public decision engine from a Spring Boot SaaS host, then discovered that its reusable gRPC contract was trapped inside the reference server. The article follows the extraction of a shared adapter module, the resulting dependency direction, and the costs that remain.
-
[JPA + Spring Mastery 09] When to use what — a JPA / JPQL / Native SQL decision tree, cuts drawn by four measurements
Across eight prior posts, this series unpacked PersistenceContext / Dirty Checking / Optimistic Lock / N+1 / IDENTITY / self-invocation / Saga·Outbox with measurements. This finale lays that evidence on a single decision tree — starting with the first fork (domain unit vs data unit), then five places where JPA Dirty Checking shines and five where it bleeds, JPQL's middle ground, and the seat for Native / JdbcTemplate / MyBatis. Four measurement cuts (Dirty Checking 132× / saveAll IDENTITY ~1000× / OFFSET 1M 570× / bulk JPQL vs Dirty Checking 84×) decide the boundaries, anchored on Eric Evans' Aggregate (DDD 2003), Fowler's Identity Map / Unit of Work (PoEAA 2002), Greg Young's CQRS Documents (2010), and Vlad Mihalcea's **High-Performance Java Persistence** (2016). The entry point you can hand over in a single URL when an interviewer asks 'how have you used JPA?'