Concurrent Utility Classes in Java: Principles and Practical Applications
Java's concurrent utility classes (JUC) provide ready-to-use concurrency control capabilities, avoiding the need to reinvent the wheel. The CountDownLatch, CyclicBarrier, Semaphore, and Exchanger are the most essential four. This article will explain each tool from core purpose, underlying mechanism, use cases, and code examples to help you und ...
Posted on Fri, 05 Jun 2026 17:28:35 +0000 by ploiesti
Implementing Thread-Safe Single-Machine Concurrent Cache
Ensuring Concurrency Safety in Cache Implementation
The second iteration phase focuses on guaranteieng thread safety for our cache implemantation while developing a core Group srtucture. This Group concept can be likened to a table in MySQL, providing namespace isolation for cached data.
A critical feature we implement is a fallback mechanism. ...
Posted on Fri, 22 May 2026 16:51:23 +0000 by sullyman
Core Principles of High-Concurrency Backend Systems
Distributed Caching Architectures
Handling Data Discrepancies
Cache Penetration: Occurs when queries request data existing neither in the cache nor the database.
Mitigation strategies include:
Storing null values for missing keys with short expiration times to prevent redundant DB hits.
Implementing a Bloom Filter to probabilistically verify d ...
Posted on Wed, 13 May 2026 10:09:20 +0000 by briand
Understanding Memory Consistency and Instruction Reordering
Instruction Reordering and Sequential Consistency
Notation Conventions
For clarity in our analysis:
R(a) denotes a read operation on variable a
W(a) denotes a write operation on variable a
We use Op(a) to represent either R(a) or W(a)
Op(a) <p Op(b) indicates a appears before b in program order
Op(a) <m Op(b) indicates a completes befo ...
Posted on Fri, 08 May 2026 22:22:07 +0000 by LordTyphon