Tag

CAS

1 views collected around this technical thread.

Code Ape Tech Column
Code Ape Tech Column
Jun 12, 2025 · Information Security

How to Build Single Sign‑On (SSO) with CAS and Session Sharing in Java

This article explains why multiple independent login systems hurt user experience and security, reviews traditional session mechanisms and their limitations in clustered environments, and then presents two session‑sharing strategies and a complete CAS‑based SSO solution with Java code examples.

AuthenticationCASJava
0 likes · 15 min read
How to Build Single Sign‑On (SSO) with CAS and Session Sharing in Java
Java Architect Essentials
Java Architect Essentials
Jun 5, 2025 · Fundamentals

Understanding CAS, LongAdder, and AtomicLong in Java for High‑Concurrency Counters

This article explains the principles, advantages, and drawbacks of CAS, LongAdder, and AtomicLong in Java, illustrating why Alibaba recommends LongAdder for high‑concurrency counter scenarios, how the ABA problem arises, and how AtomicStampedReference can mitigate it.

AtomicLongCASDistributedSystems
0 likes · 9 min read
Understanding CAS, LongAdder, and AtomicLong in Java for High‑Concurrency Counters
JD Tech Talk
JD Tech Talk
May 19, 2025 · Backend Development

Detailed Explanation of Java ConcurrentHashMap Source Code: Constructors, put, get, resize, and Concurrency Mechanisms

This article provides an in‑depth analysis of the Java ConcurrentHashMap implementation, covering its constructor logic, hash‑table sizing, the core put and get operations, element counting with addCount, multi‑threaded resizing via transfer, treeification of bins, removal, computeIfAbsent, and the design choices that forbid null keys and values to simplify concurrency handling.

CASConcurrentHashMapJava
0 likes · 36 min read
Detailed Explanation of Java ConcurrentHashMap Source Code: Constructors, put, get, resize, and Concurrency Mechanisms
Java Captain
Java Captain
May 4, 2025 · Backend Development

Understanding Java Counter Implementations: AtomicLong vs LongAdder

This article explains the principles, advantages, and drawbacks of Java's AtomicLong and LongAdder counters, describes the CAS operation and its ABA problem, and analyzes why Alibaba recommends LongAdder for high‑concurrency, high‑availability scenarios in distributed systems.

AtomicLongCASDistributed Systems
0 likes · 7 min read
Understanding Java Counter Implementations: AtomicLong vs LongAdder
Java Captain
Java Captain
May 2, 2025 · Fundamentals

Understanding Java Concurrency: Challenges and Solutions from Hardware to JVM

This article uses real‑world analogies to dissect the three core challenges of Java concurrency—ordering, visibility, and atomicity—and explains how hardware instructions, JVM mechanisms, and Java SDK tools such as locks, CAS, and waiting/notification utilities provide efficient solutions.

CASJVMJava
0 likes · 14 min read
Understanding Java Concurrency: Challenges and Solutions from Hardware to JVM
Java Tech Enthusiast
Java Tech Enthusiast
Apr 12, 2025 · Backend Development

Understanding AtomicLong vs LongAdder in Java Concurrency

In high‑concurrency Java applications, LongAdder—introduced in JDK 8 and using partitioned cells to reduce contention—generally outperforms the single‑value AtomicLong, which relies on CAS and can cause CPU waste under heavy load, so Alibaba advises LongAdder for scalable distributed counters, though memory usage and workload specifics must be considered.

AtomicLongCASJava
0 likes · 7 min read
Understanding AtomicLong vs LongAdder in Java Concurrency
Java Architect Essentials
Java Architect Essentials
Dec 9, 2024 · Information Security

Understanding Traditional Session Mechanisms and Implementing SSO with CAS in Java

This article explains the limitations of traditional HTTP session handling, explores session sharing strategies for clustered environments, and demonstrates how to build a single sign‑on solution using CAS and OAuth2 concepts with complete Java code examples for filters, controllers, and login pages.

AuthenticationCASJava
0 likes · 14 min read
Understanding Traditional Session Mechanisms and Implementing SSO with CAS in Java
Architecture & Thinking
Architecture & Thinking
Oct 10, 2024 · Backend Development

How CAS Solves High-Concurrency Consistency Issues and the Hidden ABA Problem

This article examines typical high‑concurrency scenarios such as payment processing, online ordering, and cross‑bank transfers, introduces the Compare‑and‑Swap (CAS) approach to ensure strong consistency, explains the ABA problem it can cause, and presents application‑level and data‑layer strategies—including versioning and SQL examples—to mitigate it.

ABA problemCASVersioning
0 likes · 9 min read
How CAS Solves High-Concurrency Consistency Issues and the Hidden ABA Problem
Top Architect
Top Architect
Aug 29, 2024 · Backend Development

Implementing Single Sign-On (SSO) with CAS and Session Management in Java

This article explains traditional session mechanisms, challenges in clustered environments, and presents solutions such as session replication and centralized storage, then details the design and implementation of a CAS-based Single Sign-On system in Java, including code for user forms, controllers, filters, and configuration.

Backend DevelopmentCASJava
0 likes · 17 min read
Implementing Single Sign-On (SSO) with CAS and Session Management in Java
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 13, 2024 · Backend Development

Understanding Java Atomic Variables and Their Applications in Concurrent Programming

This article provides a comprehensive guide to Java atomic variables, explaining their core concepts, underlying CAS mechanism, key classes such as AtomicInteger, AtomicLong, AtomicReference, and AtomicBoolean, and demonstrating practical code examples, use‑cases, performance benefits, limitations, and comparisons with traditional lock‑based synchronization.

Atomic VariablesCASJava
0 likes · 21 min read
Understanding Java Atomic Variables and Their Applications in Concurrent Programming
Architect's Guide
Architect's Guide
Aug 12, 2024 · Information Security

Implementing Single Sign-On (SSO) with CAS and Session Management in Distributed Backend Systems

This article explains the challenges of multiple product logins, reviews traditional session mechanisms, discusses session sharing solutions in clustered environments, and presents a CAS‑based single sign‑on implementation with Java code examples, highlighting differences between CAS and OAuth2 for secure authentication.

AuthenticationCASJava
0 likes · 13 min read
Implementing Single Sign-On (SSO) with CAS and Session Management in Distributed Backend Systems
Top Architect
Top Architect
Jul 1, 2024 · Information Security

Understanding Single Sign-On (SSO) and CAS Authentication Flow

This article explains the concept, definitions, and three deployment types of Single Sign-On (SSO), introduces the Central Authentication Service (CAS) mechanism, and details step‑by‑step login and logout processes across multiple web applications, illustrating each flow with diagrams and examples.

AuthenticationCASSSO
0 likes · 12 min read
Understanding Single Sign-On (SSO) and CAS Authentication Flow
Architecture & Thinking
Architecture & Thinking
Apr 2, 2024 · Operations

How to Ensure Data Consistency in High‑Concurrency Distributed Systems

This article explores the challenges of maintaining data consistency under high concurrency in distributed systems, reviewing common consistency issues, distributed lock implementations, optimistic and pessimistic strategies, CAS and ABA problems, and practical solutions such as Redis locks, Zookeeper, and transaction protocols.

CASDistributed Lockdata consistency
0 likes · 15 min read
How to Ensure Data Consistency in High‑Concurrency Distributed Systems
IT Services Circle
IT Services Circle
Mar 17, 2024 · Backend Development

Understanding the volatile Keyword in Java Concurrency

This article explains the Java volatile keyword, covering its underlying principles, effects on visibility and instruction reordering, appropriate usage scenarios, limitations, and provides a practical code example demonstrating how volatile ensures thread visibility and prevents dead loops in multithreaded programs.

AtomicCASJava
0 likes · 6 min read
Understanding the volatile Keyword in Java Concurrency
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Feb 26, 2024 · Information Security

Comprehensive Overview of Single Sign-On (SSO) and CAS Architecture

This article explains the fundamentals of Single Sign-On (SSO), why it is needed in distributed systems, details the components and workflow of the CAS (Central Authentication Service) implementation, and outlines common application scenarios such as e‑commerce, enterprise portals, education, and finance.

Access ControlAuthenticationCAS
0 likes · 7 min read
Comprehensive Overview of Single Sign-On (SSO) and CAS Architecture
Top Architect
Top Architect
Feb 4, 2024 · Information Security

Implementing Single Sign‑On (SSO) with CAS and Session Sharing in Distributed Systems

This article explains the problems of traditional session management in multi‑service environments, introduces session replication and centralized storage (using Redis), and demonstrates a complete CAS‑based single sign‑on solution with Java code examples for user, controller, filter, and configuration components.

AuthenticationCASJava
0 likes · 17 min read
Implementing Single Sign‑On (SSO) with CAS and Session Sharing in Distributed Systems
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jan 19, 2024 · Backend Development

Optimistic Lock: Four Implementation Methods, Principles, and Use Cases

This article explains the concept of optimistic locking in concurrent programming, details four common implementation approaches—version number, timestamp, CAS, and serial number—their underlying mechanisms, and outlines typical scenarios where optimistic locks improve data consistency and performance.

CASVersioningconcurrency control
0 likes · 6 min read
Optimistic Lock: Four Implementation Methods, Principles, and Use Cases
Java Architect Essentials
Java Architect Essentials
Oct 31, 2023 · Information Security

Understanding Traditional Session Mechanisms, Cluster Session Challenges, and SSO Solutions with CAS and OAuth2

The article explains why multiple independent systems hurt user experience, reviews traditional session and cookie based authentication, discusses session sharing problems in clustered environments, and presents centralized Redis storage and CAS‑based single sign‑on solutions with code examples and a comparison to OAuth2.

CASJavaOAuth2
0 likes · 16 min read
Understanding Traditional Session Mechanisms, Cluster Session Challenges, and SSO Solutions with CAS and OAuth2
Top Architect
Top Architect
Oct 16, 2023 · Information Security

Understanding SSO and OAuth2.0: Concepts, Processes, and Differences

This article explains the fundamentals of Single Sign‑On (SSO) and OAuth2.0, compares their token‑based authentication mechanisms, details typical implementation flows such as CAS, and clarifies the distinctions among SSO, OAuth2, JWT, Spring Security and Shiro, while also noting related promotional content.

AuthenticationCASOAuth2
0 likes · 9 min read
Understanding SSO and OAuth2.0: Concepts, Processes, and Differences