Tagged articles

Concurrency

2155 articles · Page 17 of 22
FunTester
FunTester
Oct 13, 2020 · Operations

How to Build a Fixed‑QPS Load‑Testing Framework in Java

This article explains the design and implementation of a Java‑based fixed QPS load‑testing framework, covering its multithreaded base class, concurrent executor, compensation thread, performance metrics collection, and provides source code links for practical use and further development.

ConcurrencyOpen SourcePerformance
0 likes · 8 min read
How to Build a Fixed‑QPS Load‑Testing Framework in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 12, 2020 · Fundamentals

Ordered Thread Execution in Java: join, CountDownLatch, Single Thread Pool, and CompletableFuture

This article explains how to enforce a specific execution order among three Java threads—first thread 1, then thread 2, and finally thread 3—using four techniques: the join method, CountDownLatch, a single‑thread executor, and CompletableFuture, each illustrated with complete code examples.

CompletableFutureConcurrencyCountDownLatch
0 likes · 6 min read
Ordered Thread Execution in Java: join, CountDownLatch, Single Thread Pool, and CompletableFuture
Selected Java Interview Questions
Selected Java Interview Questions
Oct 7, 2020 · Fundamentals

In-depth Overview of Java HashMap and ConcurrentHashMap: Structure, Operations, and Performance

This article provides a comprehensive explanation of Java's HashMap and ConcurrentHashMap implementations, covering their internal data structures, hashing mechanisms, load factor, resizing process, collision handling, and the differences between JDK 1.7 and 1.8, along with practical interview questions and code examples.

ConcurrencyHashMapbackend
0 likes · 15 min read
In-depth Overview of Java HashMap and ConcurrentHashMap: Structure, Operations, and Performance
Xianyu Technology
Xianyu Technology
Sep 27, 2020 · Backend Development

Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration

The article presents a design for an asynchronous component that is monitorable, fault‑tolerant, and integrates with zero overhead, compares Akka, RxJava, and a custom JUC‑based implementation, and selects the latter—using extended Callables and a CountDownLatch—to track business units, handle timeouts, and provide fallback behavior.

ConcurrencyJUCMonitoring
0 likes · 8 min read
Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration
Programmer DD
Programmer DD
Sep 25, 2020 · Backend Development

How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems

This article analyzes a real‑world incident where duplicate order IDs appeared under high concurrency, critiques the original Java implementation, demonstrates a concurrency test that exposed the flaw, and presents a revised, thread‑safe solution using AtomicInteger, Java 8 date‑time APIs, and IP‑based suffixes to guarantee uniqueness across multiple instances.

ConcurrencyDistributedUnique ID
0 likes · 11 min read
How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems
Youzan Coder
Youzan Coder
Sep 23, 2020 · Backend Development

Why Did My Dubbo Thread Pool Deadlock? A Deep Dive into CompletableFuture Blocking

The article analyzes a production incident where a Dubbo thread pool exhausted its threads due to CompletableFuture#join blocking, explains how the custom business thread pool caused mutual waiting, and presents a solution that isolates asynchronous tasks into a separate pool to restore service stability.

CompletableFutureConcurrencyDeadlock
0 likes · 9 min read
Why Did My Dubbo Thread Pool Deadlock? A Deep Dive into CompletableFuture Blocking
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.

AtomicIntegerCASConcurrency
0 likes · 15 min read
Understanding AtomicInteger, CAS, and Lock‑Free Concurrency in Java
macrozheng
macrozheng
Sep 22, 2020 · Fundamentals

Master Java Multithreading: Why, How, and Common Pitfalls Explained

This article introduces the fundamentals of Java multithreading, explaining why concurrency is needed, the differences between programs, processes and threads, four ways to create threads, and common pitfalls such as thread safety and deadlocks, all with clear code examples.

ConcurrencyMultithreadingjava
0 likes · 10 min read
Master Java Multithreading: Why, How, and Common Pitfalls Explained
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 21, 2020 · Backend Development

Understanding Java Thread Pools: Concepts, Benefits, and Usage

This article explains Java thread pools, covering their purpose, advantages, core components, constructor parameters, built‑in pool types such as Cached, Fixed and Single thread pools, and the available rejection policies, providing code examples and practical guidance for efficient multithreaded programming.

ConcurrencyExecutorServiceMultithreading
0 likes · 11 min read
Understanding Java Thread Pools: Concepts, Benefits, and Usage
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.

CASConcurrencyJMM
0 likes · 39 min read
Comprehensive Guide to Java Multithreading: Concepts, APIs, and Best Practices
vivo Internet Technology
vivo Internet Technology
Sep 16, 2020 · Backend Development

How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals

This article explains the fundamentals of HashMap, then dissects the internal fields, node‑array safety, read‑path guarantees, write‑path locking, atomic compute methods, resize‑transfer mechanics, traverser design, and bulk‑task support that together make Java's ConcurrentHashMap (C13Map) a highly concurrent, lock‑free data structure.

ConcurrencyData StructuresHashMap
0 likes · 49 min read
How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals
Senior Brother's Insights
Senior Brother's Insights
Sep 15, 2020 · Fundamentals

Why Is StringBuilder Not Thread‑Safe? Deep Dive into Java’s Internals

Although StringBuilder and StringBuffer share similar APIs, StringBuilder lacks thread safety because its append method updates shared fields without synchronization, leading to race conditions that can corrupt the internal char array and cause ArrayIndexOutOfBoundsException, as demonstrated by a multithreaded test example.

ConcurrencyStringBuilderjava
0 likes · 7 min read
Why Is StringBuilder Not Thread‑Safe? Deep Dive into Java’s Internals
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 14, 2020 · Fundamentals

Java Thread Lifecycle and Common Thread APIs

This article explains Java's thread lifecycle, detailing its six states—New, Runnable, Blocked, Waiting, Timed_waiting, and Terminated—and describes eleven commonly used thread APIs such as join(), wait(), notify(), yield(), sleep(), currentThread(), getName(), getId(), getPriority(), setPriority() and stop().

APIConcurrencyMultithreading
0 likes · 9 min read
Java Thread Lifecycle and Common Thread APIs
21CTO
21CTO
Sep 12, 2020 · Fundamentals

Why Distributed Systems Mirror Single‑Node Concurrency and How to Avoid Common Pitfalls

This article explains how concurrency issues that appear in single‑threaded programs become amplified in distributed systems, covering consistency models, network reliability, clock synchronization, fault detection, backpressure, and cascading failures, and offers practical design and testing strategies to build resilient architectures.

Concurrencyconsistencyfault tolerance
0 likes · 19 min read
Why Distributed Systems Mirror Single‑Node Concurrency and How to Avoid Common Pitfalls
StarRing Big Data Open Lab
StarRing Big Data Open Lab
Sep 11, 2020 · Databases

Why Memory Databases Outperform Disk‑Based Systems: Key Technologies Explained

This article examines the fundamental differences between traditional disk‑based DBMS and modern in‑memory databases, covering buffer management, lock versus latch mechanisms, logging and recovery, performance overhead, historical evolution, and architectural innovations that enable high‑performance memory‑resident data processing.

ConcurrencyDBMSDatabases
0 likes · 18 min read
Why Memory Databases Outperform Disk‑Based Systems: Key Technologies Explained
Wukong Talks Architecture
Wukong Talks Architecture
Sep 9, 2020 · Fundamentals

Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations

This article provides an in‑depth, illustrated overview of Java's Queue hierarchy, covering 18 concrete queue classes, their inheritance relationships, core methods, blocking and non‑blocking variants, practical usage examples, and code snippets to help developers master queue-based data structures and concurrency utilities.

BlockingQueueConcurrencyData Structures
0 likes · 26 min read
Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations
Top Architect
Top Architect
Sep 4, 2020 · Fundamentals

Understanding the volatile Keyword and Thread Synchronization in Java

This article explains how the volatile keyword ensures visibility of shared variables across threads, illustrates its behavior with examples and code, discusses its limitations regarding atomicity, and presents solutions using synchronized blocks or atomic classes for proper thread synchronization in Java.

ConcurrencySynchronizationatomic
0 likes · 8 min read
Understanding the volatile Keyword and Thread Synchronization in Java
Liangxu Linux
Liangxu Linux
Sep 3, 2020 · Fundamentals

Understanding Processes and Threads: A Factory Analogy for OS Fundamentals

This article explains core operating system concepts—CPU as a factory, the static nature of programs versus dynamic processes, how threads act as workers on production lines, and synchronization mechanisms like mutexes and semaphores, using clear analogies and diagrams.

ConcurrencySynchronizationoperating system
0 likes · 8 min read
Understanding Processes and Threads: A Factory Analogy for OS Fundamentals
macrozheng
macrozheng
Sep 3, 2020 · Backend Development

Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues

This article provides a comprehensive overview of Java's concurrent queue implementations, explaining the differences between blocking and non‑blocking queues, their underlying mechanisms, typical use‑cases, and code examples for classes such as ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue, DelayQueue, SynchronousQueue, LinkedTransferQueue, and LinkedBlockingDeque.

BlockingQueueConcurrencyJUC
0 likes · 16 min read
Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues
Wukong Talks Architecture
Wukong Talks Architecture
Sep 2, 2020 · Fundamentals

Comprehensive Overview of Java Locks and Concurrency Mechanisms

This article provides a detailed guide to various Java lock types—including optimistic, pessimistic, spin, reentrant, read‑write, fair, unfair, shared, exclusive, heavyweight, lightweight, biased, segment, mutex, synchronization, deadlock, lock coarsening, and lock elimination—explaining their principles, typical usages, advantages, disadvantages, and related JVM optimizations.

ConcurrencyLocksMultithreading
0 likes · 17 min read
Comprehensive Overview of Java Locks and Concurrency Mechanisms
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 2, 2020 · Backend Development

Understanding Java Concurrency: Synchronized Containers, OS Concurrency Tools, and Java Concurrency Utilities

This article provides a comprehensive overview of Java concurrency, covering synchronized container classes, operating‑system level synchronization primitives, and the rich set of concurrent utilities introduced in the Java standard library, with code examples and explanations of fail‑fast and fail‑safe mechanisms.

ConcurrencyConcurrentUtilitiesSynchronizedContainers
0 likes · 38 min read
Understanding Java Concurrency: Synchronized Containers, OS Concurrency Tools, and Java Concurrency Utilities
Top Architect
Top Architect
Sep 1, 2020 · Backend Development

Improving Order Number Generation to Avoid Duplicates in High‑Concurrency Java Applications

The article analyzes a real‑world incident where duplicate order IDs were generated under high concurrency, demonstrates the shortcomings of the original Java implementation, and presents a thread‑safe redesign using AtomicInteger, Java 8 date‑time API and container IP suffix to guarantee unique identifiers across parallel requests and clustered instances.

Concurrencybackenddistributed systems
0 likes · 11 min read
Improving Order Number Generation to Avoid Duplicates in High‑Concurrency Java Applications
Dada Group Technology
Dada Group Technology
Sep 1, 2020 · Backend Development

Iterative Practices for High Availability Architecture in JD.com's Order System During 618 Sales

This event features an architect from JD.com's backend team discussing strategies for designing high-availability, high-performance order systems to handle massive concurrent orders during major sales events like 618, based on real-world case studies and Elastic technology implementations.

618 SalesBackend DevelopmentConcurrency
0 likes · 2 min read
Iterative Practices for High Availability Architecture in JD.com's Order System During 618 Sales
Wukong Talks Architecture
Wukong Talks Architecture
Aug 31, 2020 · Fundamentals

Understanding Thread Safety Issues in Java Collections: ArrayList, HashSet, HashMap and Their Solutions

This article explains why core Java collection classes such as ArrayList, HashSet, and HashMap are not thread‑safe, demonstrates the underlying mechanisms of their initialization and resizing, and presents multiple approaches—including Vector, synchronized wrappers, and CopyOnWrite variants—to achieve safe concurrent access.

ArrayListConcurrencyHashMap
0 likes · 16 min read
Understanding Thread Safety Issues in Java Collections: ArrayList, HashSet, HashMap and Their Solutions
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 26, 2020 · Backend Development

Testing Volatile Thread Safety and Comparing LongAdder vs AtomicInteger Performance in Java

This article examines the thread‑safety of the volatile keyword under multi‑write scenarios, demonstrates its failure with a concurrent counter test, and benchmarks LongAdder against AtomicInteger using JMH, revealing LongAdder’s superior performance under high contention and AtomicInteger’s advantage in low‑contention environments.

AtomicIntegerConcurrencyJMH
0 likes · 8 min read
Testing Volatile Thread Safety and Comparing LongAdder vs AtomicInteger Performance in Java
21CTO
21CTO
Aug 25, 2020 · Backend Development

Go vs Java: Which Language Wins for Modern Backend Development?

The article shares a developer’s firsthand comparison of Java and Go, covering their histories, syntax, garbage collection, concurrency models, reflection, inheritance, dependency management, and practical pros and cons, to help readers decide which language better fits their backend projects.

ConcurrencyGojava
0 likes · 15 min read
Go vs Java: Which Language Wins for Modern Backend Development?
MaGe Linux Operations
MaGe Linux Operations
Aug 24, 2020 · Fundamentals

Why Coroutines Outperform Threads: A Deep Dive into Python’s Generator Magic

Coroutines, also known as micro‑threads, allow a single thread to pause and resume functions, offering higher efficiency than traditional multithreading by eliminating context‑switch overhead and lock contention, with Python’s generator‑based implementation enabling lock‑free producer‑consumer patterns and seamless multi‑core utilization via processes.

ConcurrencyProducer ConsumerPython
0 likes · 7 min read
Why Coroutines Outperform Threads: A Deep Dive into Python’s Generator Magic
Code Ape Tech Column
Code Ape Tech Column
Aug 22, 2020 · Fundamentals

How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS

This article breaks down the inner workings of Java’s ReentrantLock, explaining spin locks, the role of AbstractQueuedSynchronizer, fair vs. non‑fair locking, and step‑by‑step thread execution with code examples and diagrams to illustrate the complete lock acquisition and release process.

AQSConcurrencyLock
0 likes · 17 min read
How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS
Code Ape Tech Column
Code Ape Tech Column
Aug 21, 2020 · Fundamentals

Mastering Java Threads: From Basics to Priority and State Management

This article explains the fundamentals of Java threads, contrasting them with processes, demonstrates thread creation via extending Thread and implementing Runnable, discusses the benefits of multithreading, covers thread priority settings, and details the lifecycle states and transitions with practical code examples.

ConcurrencyMultithreadingThreads
0 likes · 9 min read
Mastering Java Threads: From Basics to Priority and State Management
Programmer DD
Programmer DD
Aug 20, 2020 · Fundamentals

Unlocking Java’s synchronized: When Does It Really Protect?

This article explores Java’s synchronized keyword in depth, covering its purpose, usage with object and class locks, seven multithreading scenarios, core principles like reentrancy and visibility, performance drawbacks, and best practices for choosing between synchronized and explicit Lock implementations.

ConcurrencyLockingMultithreading
0 likes · 18 min read
Unlocking Java’s synchronized: When Does It Really Protect?
Java High-Performance Architecture
Java High-Performance Architecture
Aug 18, 2020 · Backend Development

Master Java Thread Lifecycle: From NEW to TERMINATED Explained

Understanding Java's thread lifecycle—from creation (NEW) through runnable execution, waiting states, blocking, and termination—is essential for multithreaded development, and this guide breaks down each state, transitions, and relevant code examples to help you master concurrency concepts.

ConcurrencyLifecycleMultithreading
0 likes · 6 min read
Master Java Thread Lifecycle: From NEW to TERMINATED Explained
MaGe Linux Operations
MaGe Linux Operations
Aug 17, 2020 · Fundamentals

Boost Python Performance: Simple Parallelism with map and ThreadPool

This article explains why traditional Python threading tutorials are often over‑engineered, introduces the concise map‑based parallelism using multiprocessing and multiprocessing.dummy, and demonstrates how a few lines of code can dramatically speed up I/O‑bound and CPU‑bound tasks.

ConcurrencyMultiprocessingThreadPool
0 likes · 11 min read
Boost Python Performance: Simple Parallelism with map and ThreadPool
Liangxu Linux
Liangxu Linux
Aug 13, 2020 · Fundamentals

When to Use Processes, Threads, or Coroutines in Python? A Practical Guide

This article explains the operating‑system concepts of processes, threads, and coroutines, compares their performance with Python code examples, discusses the impact of the GIL and DMA, and provides clear guidelines for choosing the right concurrency model based on CPU‑bound, I/O‑bound, or mixed workloads.

ConcurrencyPerformancecoroutine
0 likes · 18 min read
When to Use Processes, Threads, or Coroutines in Python? A Practical Guide
Liangxu Linux
Liangxu Linux
Aug 12, 2020 · Fundamentals

Why Microkernels Can Beat Monolithic Kernels: A Deep Dive with C Simulations

The article examines the performance drawbacks of traditional monolithic kernels, especially IPC overhead, and argues that microkernel designs using arbitration can reduce lock contention, supported by C code simulations and benchmark graphs that compare execution time, CPU utilization, and scalability across thread and CPU counts.

ConcurrencyIPCSpinlock
0 likes · 19 min read
Why Microkernels Can Beat Monolithic Kernels: A Deep Dive with C Simulations
FunTester
FunTester
Aug 9, 2020 · Backend Development

Implementing Multithreaded Test Execution with Thread Pools and Distributed User Locks in Java

This article describes how to accelerate test case execution by introducing a global thread pool with CountDownLatch synchronization, presents the full Java implementations of the custom thread pool and test‑run thread classes, and explains a combined local and distributed user‑lock mechanism that uses ConcurrentHashMap caching and transactional locks to ensure safe credential retrieval.

ConcurrencyDistributedLockTestingFramework
0 likes · 9 min read
Implementing Multithreaded Test Execution with Thread Pools and Distributed User Locks in Java
Architect
Architect
Aug 8, 2020 · Fundamentals

Understanding Java Memory Model, Volatile, Atomicity, Visibility, and Ordering

This article explains the Java memory model, how variables are stored in main and working memory, and why concurrency issues like dirty reads, non‑atomic operations, and instruction reordering occur, while detailing the roles of volatile, synchronized, locks, and atomic classes in ensuring visibility, ordering, and atomicity.

AtomicityConcurrencyMemory Model
0 likes · 21 min read
Understanding Java Memory Model, Volatile, Atomicity, Visibility, and Ordering
NetEase Game Operations Platform
NetEase Game Operations Platform
Aug 8, 2020 · Backend Development

Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy

This article analyzes the intermittent “Instance XXX is not bound to a Session” error that occurs after converting a Flask‑SQLAlchemy endpoint from serial to multithreaded/gevent concurrency, reproduces the issue with test code, explains the root cause in session handling, and provides a concrete fix by patching gevent before session initialization.

ConcurrencyFlaskPython
0 likes · 6 min read
Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy
Laravel Tech Community
Laravel Tech Community
Aug 7, 2020 · Databases

Understanding MySQL Locks, Isolation Levels, and Concurrency Control

This article explains MySQL's implicit and explicit locking mechanisms—including table, row, and intention locks—covers lock modes, MVCC, transaction isolation levels, optimistic and pessimistic locking, gap locks, and deadlock causes and solutions, providing practical SQL examples for each concept.

ConcurrencyDatabaseLocks
0 likes · 12 min read
Understanding MySQL Locks, Isolation Levels, and Concurrency Control
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 7, 2020 · Backend Development

Understanding Callable, ExecutorService, and Future in Java

This article explains how Java's Callable interface, ExecutorService, and Future work together to execute asynchronous tasks, detailing their API relationships, internal implementations, and practical usage examples with code snippets illustrating task creation, submission, and result retrieval.

CallableConcurrencyExecutorService
0 likes · 14 min read
Understanding Callable, ExecutorService, and Future in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 5, 2020 · Fundamentals

Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications

This article introduces the Singleton design pattern in Java, explains its purpose of ensuring a single class instance, presents multiple implementation approaches—including eager, lazy, double-checked locking, static inner class, and enum—with code examples, and discusses practical usage scenarios and recommendations.

ConcurrencyObject-Orienteddesign-pattern
0 likes · 7 min read
Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications
FunTester
FunTester
Aug 4, 2020 · Backend Development

Mastering Java’s Phaser: A Flexible Alternative to CountDownLatch and CyclicBarrier

This article explains how Java’s Phaser class extends the capabilities of CountDownLatch and CyclicBarrier, offering dynamic phase management for multistage tasks, details its constructors and key methods, compares usage scenarios, and provides a complete code demo illustrating practical implementation.

ConcurrencyMultithreadingPhaser
0 likes · 9 min read
Mastering Java’s Phaser: A Flexible Alternative to CountDownLatch and CyclicBarrier
FunTester
FunTester
Aug 3, 2020 · Backend Development

Mastering Java’s CyclicBarrier: Synchronize Threads with Ease

This article explains Java’s CyclicBarrier synchronization barrier introduced in JDK 1.5, detailing its constructors, key methods such as await() and reset(), usage patterns for coordinating multiple threads in performance testing, and provides a complete demo with code examples and practical tips for handling timeouts and exceptions.

ConcurrencyCyclicBarrierJDK1.5
0 likes · 7 min read
Mastering Java’s CyclicBarrier: Synchronize Threads with Ease
Top Architect
Top Architect
Aug 2, 2020 · Backend Development

Key Considerations for Implementing a Local Cache in Java

This article outlines the essential design considerations for building a local cache in Java, covering data structures, capacity limits, eviction policies, expiration handling, thread safety, blocking mechanisms, simple APIs, and optional persistence, with illustrative code examples.

ConcurrencyLocal Cacheeviction
0 likes · 13 min read
Key Considerations for Implementing a Local Cache in Java
FunTester
FunTester
Aug 2, 2020 · Backend Development

Understanding Java CountDownLatch: Introduction, Core Methods, and Practical Usage

This article explains Java’s CountDownLatch class, covering its package location, constructor, essential await and countDown methods, and demonstrates practical integration within a multithreaded performance testing framework, including sample code for task execution, thread management, and cleanup.

ConcurrencyCountDownLatchMultithreading
0 likes · 5 min read
Understanding Java CountDownLatch: Introduction, Core Methods, and Practical Usage
FunTester
FunTester
Jul 30, 2020 · Backend Development

Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It

A Java Spring service method misused map.contains and REQUIRES_NEW transaction propagation, leading to unreleased DB connections and a CannotCreateTransactionException, and the article walks through the bug, its root causes, and concrete fixes including correct key checks and timeout settings.

ConcurrencyDatabaseTransaction
0 likes · 7 min read
Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It
58 Tech
58 Tech
Jul 27, 2020 · Databases

Implementing Distributed Locks with Databases, Redis, and Zookeeper

This article explains how to build distributed locks using three different technologies—database tables, Redis, and Zookeeper—detailing their implementation steps, code examples, advantages, drawbacks, and practical considerations for choosing the right solution in real‑world scenarios.

ConcurrencyDatabaseDistributed Lock
0 likes · 17 min read
Implementing Distributed Locks with Databases, Redis, and Zookeeper
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 27, 2020 · Backend Development

Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring

This article provides a comprehensive explanation of Spring's @EnableAsync and @Async annotations, covering their purpose, usage steps, handling of return values, custom thread‑pool configuration, exception handling, thread‑pool isolation, and the underlying AOP mechanism, supplemented with complete code examples.

ConcurrencyThreadPoolasync
0 likes · 18 min read
Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 24, 2020 · Fundamentals

Understanding Java's AbstractQueuedSynchronizer (AQS): Concepts, Internal Implementation, and Resource Acquisition/Release

This article explains the core concepts of Java's AbstractQueuedSynchronizer (AQS), its internal FIFO double‑linked list structure, key code snippets, how threads acquire and release resources in exclusive and shared modes, and provides practical insights for mastering Java concurrency.

AQSAbstractQueuedSynchronizerConcurrency
0 likes · 12 min read
Understanding Java's AbstractQueuedSynchronizer (AQS): Concepts, Internal Implementation, and Resource Acquisition/Release
Programmer DD
Programmer DD
Jul 18, 2020 · Fundamentals

Master Java Concurrency: Callable, Future & FutureTask Explained

This article explores Java's thread creation methods, contrasts Runnable and Callable, delves into the ExecutorService API, and provides an in‑depth analysis of Future, FutureTask, and their internal state management, complete with practical code examples and performance‑optimizing techniques for concurrent programming.

CallableConcurrencyFuture
0 likes · 23 min read
Master Java Concurrency: Callable, Future & FutureTask Explained
Beike Product & Technology
Beike Product & Technology
Jul 16, 2020 · Backend Development

Migrating PHP Services to Golang: Performance Optimization and Concurrency Practices

This article details a real‑world migration from PHP to Golang for a high‑traffic mini‑program backend, explaining the performance bottlenecks of PHP, the advantages of Go such as goroutine concurrency and low‑memory footprint, the step‑by‑step implementation, caching strategy, monitoring, tooling, and the measurable latency and stability improvements achieved.

CachingConcurrencyGolang
0 likes · 14 min read
Migrating PHP Services to Golang: Performance Optimization and Concurrency Practices
Selected Java Interview Questions
Selected Java Interview Questions
Jul 14, 2020 · Backend Development

Deep Dive into Java HashMap: Implementation Details, Internals, and Interview Questions

This article explains the internal design of Java's HashMap—including its default capacity, load factor, underlying array‑list‑tree structure, hash calculation, resizing algorithm, treeification, and common interview questions—while providing complete source code snippets and practical usage tips for developers.

CollectionsConcurrencyData Structures
0 likes · 22 min read
Deep Dive into Java HashMap: Implementation Details, Internals, and Interview Questions
Qunar Tech Salon
Qunar Tech Salon
Jul 14, 2020 · Backend Development

Distributed Lock Mechanisms and Their Redis Implementations

This article explains the concept of distributed locks, compares various implementation approaches such as Memcached, Zookeeper, Chubby, and Redis, and details single‑node and multi‑node Redis lock designs—including SETNX, SET with NX/EX options, Redisson, and the Redlock algorithm—while highlighting their advantages, pitfalls, and best‑practice recommendations.

ConcurrencyDatabaseDistributed Lock
0 likes · 14 min read
Distributed Lock Mechanisms and Their Redis Implementations
Programmer DD
Programmer DD
Jul 12, 2020 · Backend Development

How to Calculate the Optimal Thread Pool Size for Java Applications

This article compares two popular formulas for estimating Java thread pool size, analyzes their equivalence, and provides practical guidelines for configuring thread counts in I/O‑bound and CPU‑bound workloads, including code examples and performance considerations.

ConcurrencyPerformancejava
0 likes · 5 min read
How to Calculate the Optimal Thread Pool Size for Java Applications
Sohu Tech Products
Sohu Tech Products
Jul 8, 2020 · Fundamentals

Understanding Deadlocks: Causes, Conditions, Prevention, Detection, and Recovery

Deadlocks occur when multiple processes hold exclusive resources while waiting for each other, leading to indefinite blocking; this article explains deadlock concepts, resource types, the four necessary conditions, various detection and recovery methods, prevention strategies such as the banker’s algorithm, and related issues like livelocks and starvation.

ConcurrencyDeadlockOperating Systems
0 likes · 28 min read
Understanding Deadlocks: Causes, Conditions, Prevention, Detection, and Recovery
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.

CASConcurrencyLocks
0 likes · 25 min read
Understanding Java Locks: Optimistic vs Pessimistic, Spin Locks, and ReentrantLock
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 6, 2020 · Backend Development

Analyzing JDK 1.8 FutureTask Source Code

This article provides a detailed analysis of JDK 1.8’s FutureTask implementation, explaining its purpose, usage examples, internal structure, state transitions, key methods such as run, get, cancel, and the concurrency mechanisms like volatile fields, CAS operations, and thread‑waiting queues.

CallableConcurrencyFuture
0 likes · 32 min read
Analyzing JDK 1.8 FutureTask Source Code
Selected Java Interview Questions
Selected Java Interview Questions
Jul 5, 2020 · Fundamentals

Java Concurrency Interview Questions and Answers: Wait/Notify, Locks, Volatile, AQS, Thread Pools, and More

This article provides a comprehensive overview of Java concurrency concepts for interview preparation, covering wait/notify mechanisms, atomicity, visibility, ordering, synchronized implementation, volatile semantics, Java Memory Model, AQS, lock characteristics, ReentrantLock, ReadWriteLock, thread pool configurations, and producer‑consumer patterns with code examples.

ConcurrencyLocksjava
0 likes · 24 min read
Java Concurrency Interview Questions and Answers: Wait/Notify, Locks, Volatile, AQS, Thread Pools, and More
JavaEdge
JavaEdge
Jul 5, 2020 · Backend Development

Why Java Concurrency Is Tricky: 4 Pitfalls Every Developer Must Avoid

The article explains why Java concurrency is fraught with hidden traps, outlines four key misconceptions, and offers practical guidance on safely using threads, understanding memory models, and recognizing the limits of testing and libraries.

ConcurrencyMultithreadingjava
0 likes · 11 min read
Why Java Concurrency Is Tricky: 4 Pitfalls Every Developer Must Avoid
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jun 30, 2020 · Fundamentals

Understanding Java Volatile Keyword and Memory Model

This article provides a comprehensive tutorial on Java's volatile keyword, covering its role in the Java Memory Model, the three concurrency fundamentals of atomicity, visibility, and ordering, and detailed explanations of volatile's visibility, ordering guarantees, implementation mechanisms, and a source code example.

ConcurrencyJMMMemory Model
0 likes · 10 min read
Understanding Java Volatile Keyword and Memory Model
Ctrip Technology
Ctrip Technology
Jun 29, 2020 · Backend Development

Controlling Goroutine Concurrency in Go: Risks of Unbounded Goroutine Creation and Practical Limiting Techniques

The article explains why creating unlimited Goroutines in Go can exhaust system resources, demonstrates the problem with a sample program, and presents practical methods—including channel throttling, sync.WaitGroup, and third‑party Goroutine pools—to safely limit concurrency and improve performance.

ConcurrencyGoPerformance
0 likes · 10 min read
Controlling Goroutine Concurrency in Go: Risks of Unbounded Goroutine Creation and Practical Limiting Techniques
Programmer DD
Programmer DD
Jun 29, 2020 · Backend Development

Why Spring Beans Aren’t Thread‑Safe and How ThreadLocal Solves It

This article explains that Spring does not guarantee thread safety for its beans, describes the various bean scopes, clarifies why stateless singleton beans are safe, and shows how ThreadLocal works—including its implementation, usage, and potential memory‑leak pitfalls—so developers can write correct concurrent code.

ConcurrencyThreadLocaljava
0 likes · 17 min read
Why Spring Beans Aren’t Thread‑Safe and How ThreadLocal Solves It
FunTester
FunTester
Jun 28, 2020 · Fundamentals

Mastering Java Thread Lifecycle: From NEW to TERMINATED Explained

This article provides a comprehensive guide to Java's thread lifecycle, detailing each of the six thread states, their meanings, how they are triggered, and practical code examples that demonstrate state transitions and logging output.

ConcurrencyLifecycleMultithreading
0 likes · 10 min read
Mastering Java Thread Lifecycle: From NEW to TERMINATED Explained
Programmer DD
Programmer DD
Jun 28, 2020 · Fundamentals

Unlocking Java AQS Shared Mode: How Semaphore Works Under the Hood

This article explains the shared‑mode acquisition in Java's AbstractQueuedSynchronizer, walks through the core template methods, compares them with exclusive mode, and demonstrates a classic application by dissecting the Semaphore source code and its usage patterns.

AQSConcurrencySemaphore
0 likes · 14 min read
Unlocking Java AQS Shared Mode: How Semaphore Works Under the Hood
Top Architect
Top Architect
Jun 27, 2020 · Databases

MySQL Lock Mechanisms: Row‑Level, Table‑Level, Page‑Level Locks and Optimistic vs Pessimistic Concurrency Control

This article explains MySQL's locking mechanisms, detailing row‑level, table‑level, and page‑level locks, their characteristics and usage, and compares optimistic and pessimistic concurrency control, including implementation methods, storage‑engine specifics, deadlock causes, and strategies to avoid them.

ConcurrencyInnoDBLocks
0 likes · 13 min read
MySQL Lock Mechanisms: Row‑Level, Table‑Level, Page‑Level Locks and Optimistic vs Pessimistic Concurrency Control
Java Backend Technology
Java Backend Technology
Jun 27, 2020 · Fundamentals

Why Use a while Loop Instead of if with wait() in Java Synchronization?

This article explains why a while loop is required rather than an if statement when using wait() inside synchronized blocks, demonstrates the race condition with a bounded buffer example, shows the correct fix, discusses notifyAll versus notify, and illustrates how improper use can lead to deadlocks in Java multithreading.

ConcurrencyMultithreadingjava
0 likes · 8 min read
Why Use a while Loop Instead of if with wait() in Java Synchronization?
Selected Java Interview Questions
Selected Java Interview Questions
Jun 26, 2020 · Backend Development

Why Executors Should Not Be Used to Create Thread Pools and How to Properly Configure ThreadPoolExecutor in Java

This article explains the definition of thread pools, why using Executors to create them is discouraged, details the ThreadPoolExecutor constructor and its parameters, compares different Executors factory methods, demonstrates OOM testing, and provides practical guidelines for defining safe thread‑pool parameters in Java.

ConcurrencyExecutorsOOM
0 likes · 13 min read
Why Executors Should Not Be Used to Create Thread Pools and How to Properly Configure ThreadPoolExecutor in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jun 25, 2020 · Fundamentals

Java Multithreading and Concurrency Basics: Threads, Synchronization, Thread Pools, and Common Pitfalls

This article introduces the fundamentals of Java multithreading and concurrency, covering the differences between processes and threads, the relationship between Thread and Runnable, start vs run, thread creation methods, handling return values, thread states, sleep vs wait, notify vs notifyAll, yield, interrupt, and the use of thread pools with executors.

CallableConcurrencyThreadPool
0 likes · 21 min read
Java Multithreading and Concurrency Basics: Threads, Synchronization, Thread Pools, and Common Pitfalls
FunTester
FunTester
Jun 25, 2020 · Backend Development

Implementing Asynchronous Test Case Execution with Thread Pool in Java

This article explains how to design and implement a multithreaded framework for executing test cases concurrently in Java, covering thread‑pool creation, a runnable test‑case class, collection execution logic, and parameter handling with user credentials and random data generation.

ConcurrencyMultithreadingTestAutomation
0 likes · 8 min read
Implementing Asynchronous Test Case Execution with Thread Pool in Java
Java Architect Essentials
Java Architect Essentials
Jun 22, 2020 · Operations

ActiveMQ Message Queue Optimization: Removing Synchronized Lock and Tuning queuePrefetch

This article analyzes a severe ActiveMQ message‑queue backlog caused by a synchronized onMessage listener, then demonstrates how removing the lock and tuning the queuePrefetch parameter, along with a dual‑queue redesign, can boost consumption throughput by over thirty times, eliminating the data pile‑up.

ActiveMQConcurrencyMessage Queue
0 likes · 8 min read
ActiveMQ Message Queue Optimization: Removing Synchronized Lock and Tuning queuePrefetch
ITPUB
ITPUB
Jun 19, 2020 · Backend Development

Beyond C10K: Uncovering the Theoretical Limits of Server and Client Concurrency

This article examines the classic C10K problem, explores its evolution to the C10M challenge, and analytically derives the theoretical maximum concurrent connections for servers and clients using five‑tuple calculations, port‑IP combinations, and NAT constraints, while highlighting practical limits and performance considerations.

C10KConcurrencyNetwork
0 likes · 9 min read
Beyond C10K: Uncovering the Theoretical Limits of Server and Client Concurrency