Tag

ABA

0 views collected around this technical thread.

Architecture Digest
Architecture Digest
May 6, 2023 · Backend Development

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

The article explains how to achieve idempotent order creation and update in distributed systems by using database transactions, unique order identifiers, Redis locks, and version columns to prevent duplicate submissions and resolve the ABA anomaly, ensuring data consistency and reliable user experience.

ABADatabaseIdempotency
0 likes · 8 min read
Ensuring Idempotency in Order Services: Preventing Duplicate Orders and Solving the ABA Problem
Top Architect
Top Architect
Jul 17, 2022 · Backend Development

Understanding CAS, ABA Problem, and AQS in Java Concurrency: Fair vs Non‑Fair Locks

This article explains the fundamentals of CAS (compare‑and‑swap), the ABA problem and its version‑stamp solution, introduces AbstractQueuedSynchronizer (AQS) as the core of Java concurrency utilities, and compares fair and non‑fair lock implementations in ReentrantLock with code examples and diagrams.

ABAAQSCAS
0 likes · 9 min read
Understanding CAS, ABA Problem, and AQS in Java Concurrency: Fair vs Non‑Fair Locks
Cognitive Technology Team
Cognitive Technology Team
May 22, 2022 · Fundamentals

Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java

Lock‑free (non‑blocking) algorithms replace traditional locks with hardware primitives such as compare‑and‑swap (CAS) to ensure data consistency during concurrent access, offering superior scalability and eliminating deadlocks, and the article explains Java’s atomic variables, CAS‑based implementations, and how to address the ABA problem with AtomicStampedReference.

ABAAtomicCAS
0 likes · 5 min read
Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 23, 2020 · Fundamentals

Understanding CAS, AtomicInteger, and Unsafe in Java Concurrency

This article explains Java's memory model, the limitations of synchronized and volatile, introduces the java.util.concurrent.atomic package, details the CAS algorithm, the role of the Unsafe class, common pitfalls like the ABA problem, and presents code examples and solutions such as AtomicStampedReference.

ABAAtomicIntegerCAS
0 likes · 15 min read
Understanding CAS, AtomicInteger, and Unsafe in Java Concurrency