Tagged articles

Java concurrency

110 articles · Page 2 of 2
dbaplus Community
dbaplus Community
Jun 16, 2019 · Fundamentals

Understanding Thread Safety: From ThreadLocal to Locks and CAS

This article explains why thread safety concerns memory rather than threads, compares stack‑local and heap‑shared data, introduces ThreadLocal for per‑thread isolation, and covers mutual‑exclusion locks, optimistic CAS, and their appropriate use cases in concurrent programming.

CASJava concurrencyLocks
0 likes · 15 min read
Understanding Thread Safety: From ThreadLocal to Locks and CAS
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Mar 9, 2019 · Backend Development

Boost High-Concurrency Performance with Request Merging in Java

By introducing request merging and batch APIs, this article demonstrates how to improve high‑concurrency performance in Java backend services, detailing the design, data structures, scheduled execution, and code implementation while discussing trade‑offs and practical considerations.

High ConcurrencyJava concurrencybatch API
0 likes · 8 min read
Boost High-Concurrency Performance with Request Merging in Java
Programmer DD
Programmer DD
Oct 9, 2018 · Backend Development

Master Java Parallelism: From CountDownLatch to Fork/Join and Beyond

This article explores the evolution of parallel computing in Java, explaining why single‑core performance stalls, how multi‑core CPUs and GPUs enable true concurrency, and demonstrating practical implementations using CountDownLatch, CompletableFuture, Fork/Join, parallel streams, and sharding, while highlighting performance considerations and pitfalls.

CompletableFutureCountDownLatchForkJoinPool
0 likes · 15 min read
Master Java Parallelism: From CountDownLatch to Fork/Join and Beyond
Java Captain
Java Captain
Sep 25, 2018 · Fundamentals

Optimistic vs Pessimistic Locks and CAS Implementation in Java

The article explains the concepts of pessimistic and optimistic locking, details how CAS (Compare‑And‑Swap) implements optimistic locks in Java, discusses their advantages, drawbacks such as the ABA problem and high spin costs, and compares CAS usage with synchronized blocks in concurrent programming.

CASJava concurrencyOptimistic Lock
0 likes · 14 min read
Optimistic vs Pessimistic Locks and CAS Implementation in Java
Programmer DD
Programmer DD
Sep 25, 2018 · Fundamentals

Why Disruptor Beats Traditional Queues: Inside Java’s High‑Performance RingBuffer

This article explains how the Disruptor library implements lock‑free, bounded queues using a ring‑buffer, cache‑line padding and CAS operations, compares single‑ and multi‑producer sequencers, and provides practical Java code examples for building ultra‑low‑latency producer‑consumer pipelines.

High performance queueJava concurrencyMulti-producer
0 likes · 30 min read
Why Disruptor Beats Traditional Queues: Inside Java’s High‑Performance RingBuffer
Meituan Technology Team
Meituan Technology Team
Oct 1, 2016 · Backend Development

Analysis of Mutual Exclusion and Idempotency Issues in Distributed Systems and Their Solutions

The article examines how distributed systems face mutual‑exclusion and idempotency challenges, explains traditional thread and process synchronization, then details distributed‑lock techniques (e.g., Zookeeper, Redis, Tair, Cerberus) and global‑ID‑based idempotent services, emphasizing the importance of external storage, fault‑tolerance, and proper lock granularity for reliable high‑throughput applications.

Java concurrencyRedisZooKeeper
0 likes · 36 min read
Analysis of Mutual Exclusion and Idempotency Issues in Distributed Systems and Their Solutions