← Back to production work
Production / 02

Financial Transaction Workflow

A Spring/JSP transaction system where approval flows, concurrent updates and reporting reliability required explicit transaction semantics rather than controller-to-database CRUD.

Core
Spring MVC + JSP
MySQL + Redis
approval + reporting workflows
Consistency
@Transactional
isolation levels
optimistic locking
01 / Write path

Make the consistency boundary visible.

The database remains the source of truth. Cache and pagination decisions are downstream of transaction semantics, not substitutes for them.

transaction flowdetails generalized
Validated commandworkflow input and business checks
→
Service transaction@Transactional boundary
→
Version / lock checkoptimistic concurrency
→
MySQL commitsource of truth
Redisread acceleration where caching is safe
Cursor paginationavoid deep offset degradation on larger result sets
Reportingworkflow-level exception handling protects operational correctness
02 / Design record

Consistency choices followed workflow behavior.

The useful question was not “which annotation?” but “what can happen concurrently and what result is acceptable?”

01

Transaction boundary

Used Spring @Transactional around business operations that must commit or roll back together.

Invariant: partial workflow state must not escape.
02

Isolation + optimistic locking

MySQL isolation and optimistic locking make conflicting concurrent updates explicit without serializing every request.

Trade-off: concurrency with detectable conflict.
03

Query-path tuning

SQL tuning, indexing and cursor-based pagination keep read cost predictable as result sets grow.

Goal: avoid avoidable database work.
04

Cache discipline

Redis accelerates selected read paths but does not become an accidental alternate source of truth.

Boundary: performance without consistency ambiguity.