Tag

database lock

1 views collected around this technical thread.

Lobster Programming
Lobster Programming
May 30, 2025 · Backend Development

How to Ensure API Idempotency with Locks: 5 Proven Strategies

This article explores five practical lock-based approaches—including database primary keys, pessimistic and optimistic locks, state machines, and distributed locks—to achieve reliable API idempotency in distributed systems, highlighting implementation details, trade‑offs, and code examples.

API idempotencyDistributed Lockdatabase lock
0 likes · 7 min read
How to Ensure API Idempotency with Locks: 5 Proven Strategies
Selected Java Interview Questions
Selected Java Interview Questions
Feb 18, 2025 · Backend Development

Why Java synchronized Is Insufficient in Distributed Systems and Alternative Lock Solutions

The article explains how Java's synchronized keyword works only within a single JVM, why it fails to provide mutual exclusion across multiple processes in distributed systems, and presents alternative distributed locking mechanisms such as database locks and Redis-based locks with code examples.

Distributed LockJavaRedis
0 likes · 8 min read
Why Java synchronized Is Insufficient in Distributed Systems and Alternative Lock Solutions
Code Ape Tech Column
Code Ape Tech Column
Jul 25, 2023 · Backend Development

High‑Concurrency Seckill Implementation in SpringBoot: Locking Strategies and Performance Testing

This article demonstrates how to simulate a high‑concurrency flash‑sale scenario using SpringBoot, MySQL and JMeter, analyzes why naive lock‑and‑transaction code causes overselling, and presents six refined solutions—including controller‑level locking, AOP locking, pessimistic and optimistic database locks, and queue‑based approaches—along with performance test results.

AOPJMeterLock
0 likes · 20 min read
High‑Concurrency Seckill Implementation in SpringBoot: Locking Strategies and Performance Testing
Sanyou's Java Diary
Sanyou's Java Diary
May 29, 2023 · Backend Development

Mastering Distributed Locks: Design, Implementation & DB/Redis/Zookeeper Comparison

This article explains the concepts, designs, and practical implementations of distributed locks using databases, Redis, and Zookeeper, compares their advantages and drawbacks, and provides code examples and best‑practice recommendations for reliable concurrency control in distributed systems.

Distributed LockRedis lockZookeeper
0 likes · 18 min read
Mastering Distributed Locks: Design, Implementation & DB/Redis/Zookeeper Comparison
Top Architect
Top Architect
May 8, 2021 · Backend Development

Distributed Locks: Why They Are Needed, Required Conditions, and Three Implementation Approaches (Database, Redis, Zookeeper)

This article explains the necessity of distributed locks in multi‑node applications, outlines the essential properties a distributed lock must satisfy, and compares three common implementation methods—database‑based exclusive locks, Redis‑based locks, and Zookeeper‑based locks—highlighting their advantages, drawbacks, and usage patterns.

Distributed LockRedis lockbackend
0 likes · 15 min read
Distributed Locks: Why They Are Needed, Required Conditions, and Three Implementation Approaches (Database, Redis, Zookeeper)