Tagged articles
17 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 26, 2025 · Backend Development

Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions

This article examines the challenges of using JPA optimistic locking for inventory deduction under high concurrency, demonstrates why naive retry logic can cause deadlocks and stale data, and walks through five progressively refined implementations that resolve transaction, caching, and isolation issues.

RetrySpring Bootconcurrency
0 likes · 13 min read
Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions
Architect
Architect
Sep 23, 2024 · Backend Development

Ensuring Idempotency in Order Services: Preventing Duplicate Orders and Solving the ABA Problem

This article explains how to achieve idempotent order creation and updates by using unique request identifiers, database primary‑key constraints, Redis flags, and optimistic locking with version columns, thereby preventing duplicate orders and solving the ABA problem in distributed backend systems.

ABA problemIdempotencyoptimistic locking
0 likes · 11 min read
Ensuring Idempotency in Order Services: Preventing Duplicate Orders and Solving the ABA Problem
Architecture Digest
Architecture Digest
Dec 12, 2023 · Backend Development

Ensuring Idempotency and Solving the ABA Problem in Order Services

This article explains how to achieve idempotent order creation and updates in backend services by using database transactions, unique request identifiers, Redis flags, and optimistic locking with a version column to prevent duplicate submissions and solve the ABA problem.

ABA problemIdempotencyoptimistic locking
0 likes · 10 min read
Ensuring Idempotency and Solving the ABA Problem in Order Services
Java Backend Technology
Java Backend Technology
Aug 15, 2023 · Backend Development

How to Ensure Order Service Idempotency and Prevent Duplicate Orders

This article explains how to achieve idempotent order creation and updates in backend services by using unique request identifiers, database unique constraints, Redis flags, and optimistic locking with version columns, while also addressing the ABA problem with practical code examples and diagrams.

ABA problemIdempotencyoptimistic locking
0 likes · 10 min read
How to Ensure Order Service Idempotency and Prevent Duplicate Orders
JavaEdge
JavaEdge
Sep 3, 2022 · Backend Development

How to Ensure Idempotent Order Creation and Prevent ABA Issues in Distributed Systems

This article explains why order creation and payment APIs must be idempotent, outlines practical techniques such as unique request IDs, database unique constraints, Redis flags, and version‑based optimistic locking to avoid duplicate orders and solve the ABA problem in distributed environments.

ABA problemDistributed SystemsIdempotency
0 likes · 9 min read
How to Ensure Idempotent Order Creation and Prevent ABA Issues in Distributed Systems
Java Interview Crash Guide
Java Interview Crash Guide
May 30, 2021 · Backend Development

Master MyBatis-Plus with Spring Boot: CRUD, Pagination & Advanced Tips

This comprehensive tutorial demonstrates how to integrate MyBatis-Plus with Spring Boot, covering basic setup, entity and mapper creation, CRUD operations, condition wrappers, pagination, logical deletion, automatic field filling, optimistic locking, and advanced features such as multi‑tenant and dynamic table name handling, complete with code examples.

CRUDLogical DeletionSpring Boot
0 likes · 46 min read
Master MyBatis-Plus with Spring Boot: CRUD, Pagination & Advanced Tips
Top Architect
Top Architect
Apr 6, 2021 · Backend Development

MyBatis‑Plus Tutorial: Creating Databases, Defining Tables, CRUD Operations, Optimistic Locking, Logical Deletion, Performance Analysis, and Code Generation in Spring Boot

This article provides a step‑by‑step guide for using MyBatis‑Plus with Spring Boot, covering database and table creation, entity and mapper definitions, CRUD examples, automatic field filling, optimistic and logical deletion, performance plugins, query wrappers, and a code generator for rapid development.

CRUDCode GenerationSpring Boot
0 likes · 15 min read
MyBatis‑Plus Tutorial: Creating Databases, Defining Tables, CRUD Operations, Optimistic Locking, Logical Deletion, Performance Analysis, and Code Generation in Spring Boot
Architect's Alchemy Furnace
Architect's Alchemy Furnace
Aug 8, 2020 · Fundamentals

Mastering Locks: From Pessimistic to Distributed Concurrency Control

This article explains why locks are essential in programming, categorizes various lock types such as pessimistic, optimistic, spin, fair, reentrant, and distributed locks, and shows how to choose and implement them in Java for high‑concurrency, high‑availability, and high‑performance systems.

Javadistributed-systemsoptimistic locking
0 likes · 12 min read
Mastering Locks: From Pessimistic to Distributed Concurrency Control
Programmer DD
Programmer DD
May 14, 2020 · Databases

17 Essential Database Lessons Every Developer Should Know

Google Cloud engineer Jaana Dogan shares 17 hard‑earned database lessons—from ACID nuances and isolation levels to optimistic locking, sharding strategies, AUTOINCREMENT pitfalls, clock drift, and online migrations—providing a practical guide to help developers avoid common pitfalls and design more reliable data systems.

ACIDoptimistic lockingsharding
0 likes · 27 min read
17 Essential Database Lessons Every Developer Should Know
ITPUB
ITPUB
May 22, 2016 · Databases

Why Optimistic Locking Improves High‑Concurrency Performance

Optimistic locking replaces heavyweight pessimistic locks with a version‑based approach, allowing concurrent reads and only checking a version or timestamp during updates, which reduces lock contention, improves performance under high concurrency, but requires careful handling of external updates to avoid dirty data.

Concurrency ControlDatabase PerformanceVersioning
0 likes · 5 min read
Why Optimistic Locking Improves High‑Concurrency Performance
21CTO
21CTO
Apr 8, 2016 · Backend Development

Mastering Flash Sale Systems: Architecture, Challenges, and High‑Concurrency Solutions

This article explores the complete design of a flash‑sale (秒杀) system, covering business flow, technical bottlenecks, architectural principles, frontend, site and service layer designs, database sharding, caching, overload protection, anti‑cheating measures, and data‑safety strategies for handling massive concurrent traffic.

Distributed SystemsSystem Architecturecaching
0 likes · 34 min read
Mastering Flash Sale Systems: Architecture, Challenges, and High‑Concurrency Solutions