Tagged articles
146 articles
Page 2 of 2
Java Backend Technology
Java Backend Technology
Apr 28, 2021 · Backend Development

Unlocking Java 8 ConcurrentHashMap: A Deep Dive into Lock‑Free Scaling and Performance

This article explains how Java 8’s ConcurrentHashMap improves concurrency by replacing segment locks with fine‑grained CAS operations, introduces ForwardingNode for lock‑free resizing, and details the internal algorithms for initialization, put, dynamic expansion, and size counting, complete with code examples.

CASConcurrentHashMapJDK8
0 likes · 28 min read
Unlocking Java 8 ConcurrentHashMap: A Deep Dive into Lock‑Free Scaling and Performance
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 24, 2021 · Backend Development

Understanding and Using AtomicReference for Thread‑Safe Updates in Java

This article explains the limitations of volatile for compound updates, demonstrates non‑thread‑safe bank‑account examples, introduces synchronized locking, and then shows how AtomicReference with CAS operations provides a lock‑free, thread‑safe solution, including a deep dive into its internal implementation and related memory‑barrier concepts.

AtomicReferenceCASJava
0 likes · 14 min read
Understanding and Using AtomicReference for Thread‑Safe Updates in Java
21CTO
21CTO
Jan 12, 2021 · Fundamentals

How to Build a Lock‑Free Queue Using CAS: Step‑by‑Step Guide

This article explains the fundamentals of lock‑free queues, covering CAS and other atomic operations, detailed enqueue and dequeue implementations, the ABA problem and its solutions, as well as array‑based lock‑free queue designs, providing code examples and practical insights.

ABA problemCASatomic operations
0 likes · 15 min read
How to Build a Lock‑Free Queue Using CAS: Step‑by‑Step Guide
Su San Talks Tech
Su San Talks Tech
Dec 8, 2020 · Backend Development

How Java's ConcurrentHashMap Delivers High‑Performance Thread Safety

This article explains the internal design of Java's ConcurrentHashMap, covering its evolution from JDK7 to JDK8, the segment‑based locking mechanism, lock‑free reads, CAS operations, table resizing, treeification, and the key classes and methods that enable efficient concurrent access while maintaining thread safety.

CASConcurrentHashMapLock Splitting
0 likes · 42 min read
How Java's ConcurrentHashMap Delivers High‑Performance Thread Safety
Su San Talks Tech
Su San Talks Tech
Oct 7, 2020 · Backend Development

8 Proven Java Techniques to Ensure Thread‑Safe Data in Concurrent Apps

This article outlines eight practical Java approaches—including stateless design, immutability, safe publication, volatile fields, synchronized blocks, explicit locks, CAS operations, and ThreadLocal—to guarantee data safety in multithreaded environments, explaining each concept and providing concise code examples.

CASLockSynchronization
0 likes · 6 min read
8 Proven Java Techniques to Ensure Thread‑Safe Data in Concurrent Apps
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 22, 2020 · Backend Development

Understanding AtomicInteger, CAS, and Lock‑Free Concurrency in Java

This article explains how Java's AtomicInteger and related atomic classes provide lock‑free thread‑safe operations to replace non‑atomic constructs like i++, detailing their inheritance, underlying Unsafe mechanisms, CAS implementation, memory barriers, optimistic locking, the ABA problem, and practical code examples for increment, decrement, and custom CAS‑based locks.

AtomicIntegerCASJava
0 likes · 15 min read
Understanding AtomicInteger, CAS, and Lock‑Free Concurrency in Java
Selected Java Interview Questions
Selected Java Interview Questions
Sep 20, 2020 · Backend Development

Comprehensive Guide to Java Multithreading: Concepts, APIs, and Best Practices

This article provides an in‑depth overview of Java multithreading, covering fundamental concepts such as processes, threads, parallelism vs concurrency, thread creation methods, lifecycle states, synchronization mechanisms, memory model nuances, lock implementations, common pitfalls like deadlocks, and practical usage of thread pools with best‑practice recommendations.

CASJMMJava
0 likes · 39 min read
Comprehensive Guide to Java Multithreading: Concepts, APIs, and Best Practices
Big Data Technology & Architecture
Big Data Technology & Architecture
Jul 8, 2020 · Fundamentals

Understanding Java Locks: Optimistic vs Pessimistic, Spin Locks, and ReentrantLock

This article explains the various types of locks provided by Java, compares optimistic and pessimistic locking, introduces spin locks and adaptive spin locks, details lock states such as biased, lightweight, and heavyweight, and examines fair versus non‑fair, reentrant versus non‑reentrant, and exclusive versus shared locks with source code references.

CASJavaLocks
0 likes · 25 min read
Understanding Java Locks: Optimistic vs Pessimistic, Spin Locks, and ReentrantLock
Programmer DD
Programmer DD
Mar 22, 2020 · Fundamentals

Why Use Locks in Java? Understanding volatile, synchronized, and CAS

This article explains why Java uses locks to prevent dirty reads and data inconsistency, compares volatile and synchronized mechanisms, details monitor-based lock implementation, lock optimizations like biased and lightweight locks, introduces CAS and AbstractQueuedSynchronizer, and illustrates these concepts with code examples and diagrams.

AQSCASJava
0 likes · 13 min read
Why Use Locks in Java? Understanding volatile, synchronized, and CAS
JavaEdge
JavaEdge
Jan 6, 2020 · Fundamentals

Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency

This article explains the Compare‑And‑Swap (CAS) primitive, its three operands, how Java's Unsafe class implements CAS methods, the internal workings of AtomicInteger, common pitfalls like spinning, single‑variable limits and the ABA problem, and the enhancements introduced in Java 8.

AtomicIntegerCASJDK8
0 likes · 9 min read
Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency
21CTO
21CTO
Dec 16, 2019 · Information Security

How SSO Works: From CAS Architecture to Real‑World Implementation

This article explains the background, architecture, and step‑by‑step authentication flow of Single Sign‑On systems, covering the classic CAS framework, Java implementation details, and Taobao's extended SSO design with code examples.

AuthenticationCASJava
0 likes · 8 min read
How SSO Works: From CAS Architecture to Real‑World Implementation
Java Captain
Java Captain
Nov 3, 2019 · Backend Development

Understanding Java Locks, Synchronization, and Concurrency Mechanisms

This article explains why locks are needed in Java, compares volatile and synchronized, describes monitor‑based synchronization, lock optimizations such as biased and lightweight locks, introduces CAS and the AbstractQueuedSynchronizer framework, and provides practical code examples and usage scenarios.

CASJavaLocks
0 likes · 13 min read
Understanding Java Locks, Synchronization, and Concurrency Mechanisms
Ziru Technology
Ziru Technology
Sep 19, 2019 · Backend Development

Why LongAdder Beats AtomicLong in High Contention: Deep Dive into Java’s Concurrent Counter

This article explains how java.util.concurrent.atomic.LongAdder provides a more efficient counting mechanism than AtomicLong under high contention, discusses its trade‑offs in space and precision, presents JMH benchmark results, and walks through the internal implementation details such as cells, CAS loops, and hash‑based distribution.

CASJMHJava
0 likes · 13 min read
Why LongAdder Beats AtomicLong in High Contention: Deep Dive into Java’s Concurrent Counter
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
ITPUB
ITPUB
Apr 25, 2019 · Databases

Pessimistic vs Optimistic Locks: Choosing the Right Concurrency Control for High‑Traffic Databases

This article explains the concepts of concurrency control, detailing pessimistic and optimistic locking mechanisms, their implementation in MySQL, practical SQL examples, advantages, drawbacks such as deadlocks and ABA problems, and guidance on selecting the appropriate lock strategy for high‑concurrency applications.

CASConcurrency ControlVersioning
0 likes · 11 min read
Pessimistic vs Optimistic Locks: Choosing the Right Concurrency Control for High‑Traffic Databases
Meituan Technology Team
Meituan Technology Team
Nov 15, 2018 · Backend Development

Understanding Java Locks: Optimistic, Pessimistic, CAS, and Various Lock Types

The article explains Java’s various lock mechanisms—including optimistic vs. pessimistic, spin and adaptive spin, no‑lock through heavyweight states, fair vs. unfair, reentrant vs. non‑reentrant, and exclusive vs. shared locks—using JDK 8 source code and practical examples to guide developers in choosing the appropriate lock for different concurrency scenarios.

CASJavaLocks
0 likes · 26 min read
Understanding Java Locks: Optimistic, Pessimistic, CAS, and Various Lock Types
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 concurrencySynchronization
0 likes · 14 min read
Optimistic vs Pessimistic Locks and CAS Implementation in Java
Big Data and Microservices
Big Data and Microservices
Aug 4, 2018 · Information Security

How CAS Enables Secure Single Sign-On: Architecture and Workflow Explained

CAS (Central Authentication Service) is an open‑source, enterprise‑grade single sign‑on solution that centralizes user authentication across trusted systems, offering reduced login time, improved security, and streamlined user management, with a clear protocol flow involving service tickets, redirects, and encrypted cookies.

AuthenticationCASSSO
0 likes · 5 min read
How CAS Enables Secure Single Sign-On: Architecture and Workflow Explained
Programmer DD
Programmer DD
Jul 18, 2018 · Backend Development

How Does Java’s ConcurrentLinkedQueue Achieve Lock‑Free Thread Safety?

This article explains the lock‑free design of Java's ConcurrentLinkedQueue, detailing its core invariants, the internal Node structure, and step‑by‑step analyses of the offer and poll methods with code snippets and visual illustrations to demystify its CAS‑based concurrency mechanisms.

CASConcurrentLinkedQueueJava
0 likes · 13 min read
How Does Java’s ConcurrentLinkedQueue Achieve Lock‑Free Thread Safety?
21CTO
21CTO
May 9, 2018 · Backend Development

Why Use Locks? Deep Dive into Java Synchronization, Volatile, and AQS

This article explains why locks are needed in concurrent programming, explores the fundamentals of volatile and synchronized, details monitor mechanisms, lock optimizations like biased and lightweight locks, compares CAS and AQS, and illustrates Java lock implementations with diagrams and code examples.

AQSCASJava
0 likes · 11 min read
Why Use Locks? Deep Dive into Java Synchronization, Volatile, and AQS
Java Captain
Java Captain
May 8, 2018 · Fundamentals

Understanding Java Locks: volatile, synchronized, Monitor, CAS, and AQS

This article explains why locks are needed in Java, describes the fundamentals of volatile and synchronized, details monitor-based synchronization, explores lock optimizations such as biased and lightweight locks, and covers CAS and the AbstractQueuedSynchronizer framework for building concurrent structures.

AQSCASJava
0 likes · 12 min read
Understanding Java Locks: volatile, synchronized, Monitor, CAS, and AQS
Java Captain
Java Captain
Feb 11, 2018 · Backend Development

Analyzing Java Concurrency Models: CopyOnWriteArrayList, ConcurrentHashMap, and LinkedBlockingQueue

This article examines three Java concurrency implementations—CopyOnWriteArrayList, ConcurrentHashMap, and LinkedBlockingQueue—explaining their underlying principles, code structures, and how they achieve thread‑safe read/write operations using techniques such as copy‑on‑write, CAS, and separate locks.

CASConcurrentHashMapCopyOnWriteArrayList
0 likes · 13 min read
Analyzing Java Concurrency Models: CopyOnWriteArrayList, ConcurrentHashMap, and LinkedBlockingQueue
Architecture Digest
Architecture Digest
Nov 17, 2017 · Backend Development

A Comprehensive Overview of Java Concurrency Programming

This article provides a high‑level summary of Java concurrency, covering thread creation methods, thread models, thread pools, Future and CompletableFuture, the Fork/Join framework, volatile, CAS, AQS, synchronized locks, and concurrent queue implementations, with code examples and reference links for deeper study.

AQSCASFuture
0 likes · 39 min read
A Comprehensive Overview of Java Concurrency Programming
Java Backend Technology
Java Backend Technology
Oct 31, 2017 · Backend Development

Unlock High-Performance Java with Lock-Free Concurrency and Atomic Classes

This article explains how lock-free techniques such as Compare-And-Swap (CAS) and Java's atomic classes—including AtomicBoolean, AtomicInteger, AtomicReference, and their array and field updaters—provide optimistic concurrency control, reduce context switches, and improve performance compared to traditional locking mechanisms.

CASJavaatomic
0 likes · 11 min read
Unlock High-Performance Java with Lock-Free Concurrency and Atomic Classes
Alibaba Cloud Developer
Alibaba Cloud Developer
May 15, 2017 · Fundamentals

China Unveils World's First Light-Based Quantum Computer Surpassing Classical Machines

On May 3, China announced the creation of the world’s first optical quantum computer that outperforms early classical machines, highlighting breakthroughs by the University of Science and Technology of China, Alibaba‑CAS quantum lab, Zhejiang University and others, and outlining rapid advances in photonic and superconducting qubit technologies.

AlibabaCASChina research
0 likes · 5 min read
China Unveils World's First Light-Based Quantum Computer Surpassing Classical Machines
21CTO
21CTO
Nov 5, 2015 · Backend Development

How CAS Prevents Data Inconsistency in High‑Concurrency Transactions

This article explains why concurrent read‑write operations on a shared balance can cause inconsistencies, illustrates the problem with a purchase‑balance example, and shows how a Compare‑And‑Set (CAS) update clause guarantees atomicity and preserves data integrity.

BackendCASConsistency
0 likes · 7 min read
How CAS Prevents Data Inconsistency in High‑Concurrency Transactions
21CTO
21CTO
Oct 15, 2015 · Information Security

How Single Sign-On (SSO) Boosts Enterprise Efficiency and Security

The article explains why enterprises need a unified Single Sign-On (SSO) system, detailing its benefits for user convenience, administrator workload reduction, security improvements, and integration standards, while comparing cookie‑ and session‑based implementations and illustrating the CAS open‑source solution.

AuthenticationCASEnterprise
0 likes · 15 min read
How Single Sign-On (SSO) Boosts Enterprise Efficiency and Security
Architect
Architect
Aug 26, 2015 · Backend Development

Design Considerations for Master/Slave Distributed Cache with Proxy and CAS

The article analyzes the use of a master/slave architecture for distributed caching, explains why two clusters, CAS, and proxy are employed, discusses consistency and availability challenges, and evaluates possible mitigation strategies for cache failures.

CASConsistencyMaster‑Slave
0 likes · 7 min read
Design Considerations for Master/Slave Distributed Cache with Proxy and CAS