Tagged articles

concurrency

2234 articles · Page 13 of 23
Top Architect
Top Architect
Jul 18, 2022 · Backend Development

Understanding ThreadPoolExecutor Parameters and Working Mechanism in Java

This article explains the core concepts, configurable parameters, and execution workflow of Java's ThreadPoolExecutor, illustrating each setting with analogies, code examples, and step‑by‑step analysis to help developers design safe and efficient thread pools.

JavaThreadPoolThreadPoolExecutor
0 likes · 8 min read
Understanding ThreadPoolExecutor Parameters and Working Mechanism in Java
Dada Group Technology
Dada Group Technology
Jul 16, 2022 · Backend Development

Optimizing Rider Withdrawal Payments at Dada Express: Asynchronous Concurrency, Extended Timeouts, Idempotent Retries, and Security Enhancements

This article details how Dada Express improved the efficiency of rider withdrawal payments by redesigning the clearing and disbursement workflow, introducing asynchronous thread‑pool concurrency, extending API timeouts, implementing idempotent retry logic, and adding safeguards to ensure fund security, resulting in a three‑fold reduction in processing time during peak periods.

System Designbackendconcurrency
0 likes · 9 min read
Optimizing Rider Withdrawal Payments at Dada Express: Asynchronous Concurrency, Extended Timeouts, Idempotent Retries, and Security Enhancements
Tencent Cloud Developer
Tencent Cloud Developer
Jul 14, 2022 · Fundamentals

Implementation Details of Scheduler and Context in libunifex (CPU Thread Execution Context)

The article explains libunifex’s CPU‑thread scheduler architecture, detailing how a lightweight scheduler wraps a manual_event_loop execution context with a mutex‑protected FIFO task queue, how operations bridge receivers to the context, and outlines various thread‑bound and platform‑specific scheduler variants.

C++Execution Contextasync
0 likes · 16 min read
Implementation Details of Scheduler and Context in libunifex (CPU Thread Execution Context)
Sohu Tech Products
Sohu Tech Products
Jul 13, 2022 · Mobile Development

What Is a Lock? Understanding iOS Synchronization Primitives

This article explains the concept of locks in iOS, describing their purpose, the actions of acquiring and releasing, common lock types such as spin locks, mutexes, semaphores, and their implementations using OSSpinLock, pthread_mutex, NSCondition, NSLock, recursive locks, and read‑write locks, along with performance considerations and underlying principles.

LocksPerformanceconcurrency
0 likes · 19 min read
What Is a Lock? Understanding iOS Synchronization Primitives
Cognitive Technology Team
Cognitive Technology Team
Jul 13, 2022 · Backend Development

ThreadPoolExecutor Hook Methods beforeExecute and afterExecute Must Not Throw Exceptions, Otherwise Threads Exit

The article explains that overriding ThreadPoolExecutor's beforeExecute and afterExecute hooks requires handling any exceptions internally, because uncaught exceptions cause the worker thread to terminate, reducing pool size and preventing proper reuse, and such errors are not logged by default.

JavaThreadPoolExecutorbackend development
0 likes · 4 min read
ThreadPoolExecutor Hook Methods beforeExecute and afterExecute Must Not Throw Exceptions, Otherwise Threads Exit
FunTester
FunTester
Jul 12, 2022 · Backend Development

Why AtomicInteger Outperforms Random() in High‑Concurrency Random Number Generation

The article analyzes two common random‑number scenarios in software testing, identifies a CPU‑heavy custom random method, benchmarks ThreadLocalRandom, AtomicInteger, and plain int implementations under multi‑ and single‑thread loads, and proposes a lightweight AtomicInteger‑based selector that consistently delivers the best performance.

AtomicIntegerJavaRandom Number Generation
0 likes · 7 min read
Why AtomicInteger Outperforms Random() in High‑Concurrency Random Number Generation
Cognitive Technology Team
Cognitive Technology Team
Jul 9, 2022 · Backend Development

Avoiding OOM When Using java.util.concurrent.ExecutorCompletionService

The article explains how submitting tasks to ExecutorCompletionService without retrieving their results causes the internal unbounded LinkedBlockingQueue to retain Future objects, leading to memory leaks and OutOfMemoryError, and demonstrates the correct usage patterns to prevent this issue.

ExecutorCompletionServiceJavaMemoryLeak
0 likes · 6 min read
Avoiding OOM When Using java.util.concurrent.ExecutorCompletionService
Sanyou's Java Diary
Sanyou's Java Diary
Jul 4, 2022 · Backend Development

Mastering CompletableFuture: From Basics to RocketMQ Integration

This article introduces Java's CompletableFuture, compares it with Future, explains its core APIs, demonstrates common usage patterns—including creation, result retrieval, chaining, exception handling, and task combination—and shows a practical integration example within RocketMQ's message storage workflow.

CompletableFutureRocketMQasync
0 likes · 15 min read
Mastering CompletableFuture: From Basics to RocketMQ Integration
Architect
Architect
Jul 2, 2022 · Backend Development

Asynchronous Execution Techniques in Spring Boot with CompletableFuture

The article explains multiple methods for implementing asynchronous execution in Spring Boot, covering @Async annotation, Java 8 CompletableFuture, Callable, WebAsyncTask, DeferredResult, Tomcat connection tuning, container switching to Undertow, and async interception, all illustrated with complete code examples.

AsynchronousCompletableFutureJava
0 likes · 11 min read
Asynchronous Execution Techniques in Spring Boot with CompletableFuture
Bin's Tech Cabin
Bin's Tech Cabin
Jul 1, 2022 · Backend Development

Mastering Redis Distributed Locks: From Basics to Advanced Redlock Strategies

This comprehensive guide walks through the fundamentals, pitfalls, and advanced implementations of Redis distributed locks—including basic SETNX usage, safe lock release with Lua scripts, re‑entrant lock design, timeout handling, Redlock debates, and practical Redisson integration—providing Java developers with actionable patterns for reliable concurrency control.

JavaLuaRedisson
0 likes · 25 min read
Mastering Redis Distributed Locks: From Basics to Advanced Redlock Strategies
Programmer DD
Programmer DD
Jun 29, 2022 · Fundamentals

Why Real-World Analogies Reveal the 3 Core Challenges of Concurrent Programming

The article explains that concurrent programming is deeply tied to real-life scenarios and outlines its three core problems—division of work, synchronization, and mutual exclusion—using company organization, task dependencies, and traffic flow analogies, plus Java code examples to illustrate each concept.

Javaconcurrencymultithreading
0 likes · 9 min read
Why Real-World Analogies Reveal the 3 Core Challenges of Concurrent Programming
ITPUB
ITPUB
Jun 28, 2022 · Backend Development

Mastering Distributed Locks: Database, Redis, and Zookeeper Strategies

This article explains the design and implementation of distributed locks, covering database pessimistic and optimistic locks, various Redis lock patterns, Redisson and RedLock, as well as Zookeeper's lock mechanism, and compares their advantages, drawbacks, and suitable use cases.

DatabaseZookeeperbackend
0 likes · 20 min read
Mastering Distributed Locks: Database, Redis, and Zookeeper Strategies
FunTester
FunTester
Jun 22, 2022 · Backend Development

Implementing Go's sync.Once Behavior in Java Using ReentrantLock

This article explains the Go sync.Once primitive, demonstrates its one‑time execution with concurrent goroutines, and shows how to recreate the same functionality in Java by using a static collection and ReentrantLock to ensure a block of code runs only once across multiple threads.

JavaReentrantLockconcurrency
0 likes · 5 min read
Implementing Go's sync.Once Behavior in Java Using ReentrantLock
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Jun 22, 2022 · Fundamentals

Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers

This article explores the fundamentals of CPU cache hierarchy, why caches are needed, how cache inconsistency arises in multicore systems, and the mechanisms—such as cache coherence protocols, MESI, store buffers, invalidate queues, and memory barriers—that ensure correct data ordering and visibility across processors.

CPUcache-coherenceconcurrency
0 likes · 21 min read
Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers
The Dominant Programmer
The Dominant Programmer
Jun 15, 2022 · Operations

How to Simulate 20,000 Local Requests with JMeter

This guide shows how to download, configure, and run Apache JMeter on a Windows machine to generate 20,000 HTTP requests locally by setting up a thread group, adding an HTTP sampler, and using listeners such as the Aggregate Report to analyze the load‑test results.

HTTP requestJMeterconcurrency
0 likes · 3 min read
How to Simulate 20,000 Local Requests with JMeter
Tencent Cloud Developer
Tencent Cloud Developer
Jun 13, 2022 · Backend Development

Analysis of Go's sync.Map Implementation: Design, Architecture, and Source Code Walkthrough

The article explains how Go’s sync.Map achieves high‑concurrency performance by maintaining a lock‑free read‑only snapshot in an atomic.Value and a mutex‑protected dirty map, detailing entry state transitions, miss‑driven promotion, and the Store, Load, and Delete operations that together avoid a global lock.

Goconcurrencymap
0 likes · 18 min read
Analysis of Go's sync.Map Implementation: Design, Architecture, and Source Code Walkthrough
21CTO
21CTO
Jun 11, 2022 · Mobile Development

Swift & SwiftUI 2022: Concurrency, Custom Layouts, and New Charts

The article reviews Apple’s WWDC 2022 announcements, highlighting Swift’s new concurrency model, actor and distributed‑actor features, SwiftUI’s custom grid layout and charting capabilities, as well as enhanced string handling and built‑in regex support for developers across iOS, iPadOS, macOS and watchOS.

AppleSwiftSwiftUI
0 likes · 5 min read
Swift & SwiftUI 2022: Concurrency, Custom Layouts, and New Charts
Java Backend Technology
Java Backend Technology
Jun 10, 2022 · Backend Development

How MemorySafeLBQ Prevents OOM in Java Thread Pools – A Deep Dive

This article explores the design and implementation of MemoryLimitedLBQ and MemorySafeLBQ, two custom LinkedBlockingQueue variants that limit memory usage to avoid Out‑Of‑Memory errors in Java thread pools, comparing their mechanisms, instrumentation dependencies, and practical usage in open‑source projects.

InstrumentationLinkedBlockingQueueconcurrency
0 likes · 13 min read
How MemorySafeLBQ Prevents OOM in Java Thread Pools – A Deep Dive
Code Ape Tech Column
Code Ape Tech Column
Jun 9, 2022 · Backend Development

Introduction to Disruptor: High‑Performance Java Message Queue with Full Code Demo

This article introduces the open‑source Disruptor library, explains its core concepts such as Ring Buffer, Sequencer, and Wait Strategy, and provides a step‑by‑step Java implementation—including Maven dependency, event model, factory, handler, manager, producer, and test code—demonstrating how to build a fast in‑memory message queue.

DisruptorJavaMessage Queue
0 likes · 10 min read
Introduction to Disruptor: High‑Performance Java Message Queue with Full Code Demo
Tencent Cloud Developer
Tencent Cloud Developer
Jun 8, 2022 · Backend Development

Understanding Go Map and Slice Concurrency Safety and Parameter Passing

The article explains that Go maps and slices are not safe for concurrent reads or writes, describes how the runtime detects map violations, and recommends using sync.Mutex, sync.RWMutex, or sync.Map for maps and external synchronization for slices, while also clarifying that passing these reference types to functions shares underlying data unless explicitly copied.

Goconcurrencylocking
0 likes · 12 min read
Understanding Go Map and Slice Concurrency Safety and Parameter Passing
JavaEdge
JavaEdge
Jun 2, 2022 · Backend Development

How Does Java’s synchronized Work? A Deep Dive into Lock Mechanisms

This article simulates a Baidu interview to explain the underlying implementation of Java’s synchronized keyword, covering monitorenter/monitorexit bytecode, object header Mark Word, lock states, lock escalation from biased to heavyweight, and the role of CAS in lock acquisition and release.

JVMJavaLock
0 likes · 10 min read
How Does Java’s synchronized Work? A Deep Dive into Lock Mechanisms
Tencent Cloud Developer
Tencent Cloud Developer
Jun 2, 2022 · Fundamentals

A Detailed Explanation of Asynchronous Programming

The article explains asynchronous programming by contrasting concurrency, parallelism, and synchronization, illustrates how splitting serial work into independent async tasks can improve performance but introduces resource, locking, and state‑tracking challenges, and offers strategies such as careful task limits, locking, queues, and result monitoring.

Asynchronous ProgrammingParallelismconcurrency
0 likes · 23 min read
A Detailed Explanation of Asynchronous Programming
IT Services Circle
IT Services Circle
Jun 2, 2022 · Fundamentals

Comprehensive Guide to Java Concurrency: Threads, Locks, Executors, and Synchronization Primitives

This article provides an in-depth overview of Java concurrency, covering thread creation, lifecycle, synchronization mechanisms such as locks, semaphores, barriers, atomic classes, concurrent collections, executor frameworks, fork/join, CompletableFuture, and various blocking queues, with code examples and implementation details.

BlockingQueueJavaLocks
0 likes · 52 min read
Comprehensive Guide to Java Concurrency: Threads, Locks, Executors, and Synchronization Primitives
Code Ape Tech Column
Code Ape Tech Column
Jun 2, 2022 · Backend Development

Using Alibaba's TransmittableThreadLocal to Propagate ThreadLocal Variables in Thread Pools

This article explains why InheritableThreadLocal fails in pooled threads, introduces Alibaba's TransmittableThreadLocal library, demonstrates how to wrap executors and rewrite code to correctly transmit ThreadLocal data across parent‑child threads in Java thread pools, and provides detailed implementation and usage examples.

JavaThreadLocalThreadPool
0 likes · 13 min read
Using Alibaba's TransmittableThreadLocal to Propagate ThreadLocal Variables in Thread Pools
FunTester
FunTester
Jun 2, 2022 · Backend Development

How Fast Can Apache Commons Pool2 Run? A Deep Performance Test

This article details a performance evaluation of Apache Commons Pool2 on a MacBook Pro, comparing no‑wait and wait scenarios, presenting QPS results, identifying bottlenecks in LinkedBlockingDeque and AtomicLong, and outlining the test setup, code, and conclusions.

GroovyJavaapache-commons-pool
0 likes · 5 min read
How Fast Can Apache Commons Pool2 Run? A Deep Performance Test
Code Ape Tech Column
Code Ape Tech Column
Jun 1, 2022 · Fundamentals

Understanding sun.misc.Unsafe: Construction, Core Functions, and Practical Use Cases

This article explains the purpose, construction, and key functionalities of Java's sun.misc.Unsafe class, covering memory management, object allocation, class definition, offset handling, array operations, thread scheduling, CAS, and memory fences, while also showing how to obtain an Unsafe instance via reflection.

JavaMemory Managementconcurrency
0 likes · 11 min read
Understanding sun.misc.Unsafe: Construction, Core Functions, and Practical Use Cases
Shepherd Advanced Notes
Shepherd Advanced Notes
May 30, 2022 · Backend Development

Mastering Asynchronous Orchestration with Java CompletableFuture

This article explains how Java 8's CompletableFuture enables low‑overhead asynchronous composition, walks through its core methods, shows practical code examples for parallel data fetching, error handling, and task combination, and reveals implementation details from the source code.

AsynchronousCompletableFutureJava
0 likes · 17 min read
Mastering Asynchronous Orchestration with Java CompletableFuture
dbaplus Community
dbaplus Community
May 25, 2022 · Backend Development

How to Ensure Concurrency Quality with Distributed Locks in E‑Commerce Systems

This article explains why concurrency issues like overselling occur in e‑commerce, introduces distributed lock concepts and mainstream implementations (MySQL, Redis, Zookeeper/etcd), and provides a three‑stage quality‑assurance framework with code‑review checklists, testing methods, and data‑reconciliation techniques.

E‑commerceMySQLRedis
0 likes · 12 min read
How to Ensure Concurrency Quality with Distributed Locks in E‑Commerce Systems
DaTaobao Tech
DaTaobao Tech
May 25, 2022 · Backend Development

Best Practices for Java Thread Pools and ThreadLocal in Backend Development

The article outlines Java thread‑pool fundamentals, explains ThreadPoolExecutor parameters and Tomcat’s custom pool behavior, and provides best‑practice guidelines for creating pools directly, configuring rejection policies, and safely using ThreadLocal—including static declarations, proper cleanup, and avoiding memory‑leak pitfalls—to build stable, high‑performance backend services.

JavaThreadLocalThreadPool
0 likes · 32 min read
Best Practices for Java Thread Pools and ThreadLocal in Backend Development
Code Ape Tech Column
Code Ape Tech Column
May 24, 2022 · Databases

Understanding MVCC (Multi-Version Concurrency Control) in MySQL InnoDB

This article provides a comprehensive, step‑by‑step explanation of MySQL InnoDB's MVCC mechanism, covering its fundamentals, the role of Undo Log and Read View, and how it enables repeatable‑read and read‑committed isolation levels while preventing dirty reads and other concurrency anomalies.

DatabaseMVCCMySQL
0 likes · 12 min read
Understanding MVCC (Multi-Version Concurrency Control) in MySQL InnoDB
FunTester
FunTester
May 23, 2022 · Backend Development

Using Apache Commons Pool2 GenericKeyedObjectPool for gRPC Connection Management

This article explains how to apply Apache Commons Pool2's GenericKeyedObjectPool to pool gRPC ManagedChannel objects, discusses thread‑safety and performance considerations, and provides concrete Java code for a keyed object pool factory, pool configuration, and typical acquire/return usage patterns.

Apache Commons Pool2Javaconcurrency
0 likes · 7 min read
Using Apache Commons Pool2 GenericKeyedObjectPool for gRPC Connection Management
Cognitive Technology Team
Cognitive Technology Team
May 22, 2022 · Fundamentals

Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java

Lock‑free (non‑blocking) algorithms replace traditional locks with hardware primitives such as compare‑and‑swap (CAS) to ensure data consistency during concurrent access, offering superior scalability and eliminating deadlocks, and the article explains Java’s atomic variables, CAS‑based implementations, and how to address the ABA problem with AtomicStampedReference.

ABACASJava
0 likes · 5 min read
Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java
Code Ape Tech Column
Code Ape Tech Column
May 19, 2022 · Backend Development

Understanding Java CompletionService: Implementation, Usage, and Performance Benefits

This article explains the purpose and implementation of Java's CompletionService, compares it with ExecutorService, shows how it retrieves task results in completion order, provides detailed source code analysis, and discusses typical use cases such as load‑balancing and fast‑result retrieval in concurrent applications.

CompletionServiceJavaPerformance
0 likes · 11 min read
Understanding Java CompletionService: Implementation, Usage, and Performance Benefits
Sohu Tech Products
Sohu Tech Products
May 18, 2022 · Fundamentals

Understanding Strong vs. Weak Consistency in Java's ConcurrentHashMap

This article explains the concepts of strong and weak consistency, their roots in visibility and ordering within the Java Memory Model, and how Java 8’s ConcurrentHashMap uses volatile fields, CAS, and unsafe operations to achieve strong consistency for put/get while retaining weak consistency for operations like size().

ConcurrentHashMapJavaMemory Model
0 likes · 14 min read
Understanding Strong vs. Weak Consistency in Java's ConcurrentHashMap
Code Ape Tech Column
Code Ape Tech Column
May 17, 2022 · Fundamentals

Understanding Compare‑And‑Swap (CAS), Its Mechanisms, and Common Pitfalls

This article explains the fundamentals of the compare‑and‑swap (CAS) atomic primitive, how CPUs guarantee its atomicity through bus and cache locking, illustrates a Java spin‑lock implementation using CAS, and discusses typical issues such as single‑variable limitation, long spin times, and the ABA problem with mitigation strategies.

ABA problemCASJava
0 likes · 9 min read
Understanding Compare‑And‑Swap (CAS), Its Mechanisms, and Common Pitfalls
Tencent Cloud Developer
Tencent Cloud Developer
May 16, 2022 · Fundamentals

Lock‑Free Queues: Use Cases, Implementations, and Performance Analysis

The article explains when lock‑free queues are needed, why they outperform locked alternatives, presents single‑producer and multi‑producer implementations with detailed code, benchmarks their throughput versus mutex‑based queues, and concludes they excel for low‑contention or dominant‑producer scenarios but may lag under high contention.

C++concurrencylock-free queue
0 likes · 33 min read
Lock‑Free Queues: Use Cases, Implementations, and Performance Analysis
Cognitive Technology Team
Cognitive Technology Team
May 14, 2022 · Backend Development

Copy‑On‑Write Strategy and Its Implementation in Java's CopyOnWriteArrayList

The article explains the copy‑on‑write (COW) concurrency strategy, its suitability for read‑heavy scenarios, and demonstrates how Java implements COW with CopyOnWriteArrayList and CopyOnWriteArraySet, including volatile array handling, write‑locking, snapshot reads, and iterator behavior.

Copy-on-WriteCopyOnWriteArrayListData Structures
0 likes · 7 min read
Copy‑On‑Write Strategy and Its Implementation in Java's CopyOnWriteArrayList
Su San Talks Tech
Su San Talks Tech
May 14, 2022 · Backend Development

Unlocking ThreadLocal: How Java Manages Thread‑Local Data and Avoids Memory Leaks

This article explains why ThreadLocal is used in Java concurrency, dives into its internal implementation—including ThreadLocalMap, weak‑referenced keys, hash‑based indexing and resizing—covers common pitfalls such as memory leaks, and shows how InheritableThreadLocal and TransmittableThreadLocal can safely share data across child threads and thread pools.

InheritableThreadLocalJavaMemoryLeak
0 likes · 24 min read
Unlocking ThreadLocal: How Java Manages Thread‑Local Data and Avoids Memory Leaks
High Availability Architecture
High Availability Architecture
May 13, 2022 · Backend Development

Error Handling and Errgroup Usage in Go

This article explains Go's built-in error interface, distinguishes errors from exceptions, compares three common error-handling patterns, discusses wrapping errors with packages like pkg/errors, and demonstrates centralized error handling using errgroup, including usage examples and best-practice recommendations for backend Go development.

ErrGroupGobackend
0 likes · 17 min read
Error Handling and Errgroup Usage in Go
Meituan Technology Team
Meituan Technology Team
May 12, 2022 · Backend Development

CompletableFuture: Principles, Usage, and Practical Implementation in Java

The article explains how Java 8’s CompletableFuture enables efficient asynchronous programming—illustrated by Meituan’s order service refactor—by replacing slow synchronous RPC calls with composable, lazy, back‑pressure‑aware futures, offering thread‑pool best practices, robust exception handling, utility helpers, and achieving up to a 45 % latency reduction and fewer servers.

AsynchronousCompletableFutureJava
0 likes · 29 min read
CompletableFuture: Principles, Usage, and Practical Implementation in Java
HomeTech
HomeTech
May 11, 2022 · Fundamentals

Go Language Overview, Project Practices, and New Features in Go 1.18

This article introduces the Go programming language, showcases several high‑traffic production projects built with Go at Autohome, and explains the major Go 1.18 enhancements such as generics, workspaces, and fuzzing, while providing performance comparisons, code samples, and practical optimization tips.

Performancebackendconcurrency
0 likes · 21 min read
Go Language Overview, Project Practices, and New Features in Go 1.18
Zhuanzhuan Tech
Zhuanzhuan Tech
May 11, 2022 · Backend Development

Evolution of Grouped Concurrency Scheduling and the Self‑Driven Concurrency Model for E‑commerce Backend Services

This article analyzes the challenges of aggregating multiple RPC calls in e‑commerce app backends, explains simple and complex concurrency scenarios, introduces grouped concurrency scheduling, and presents a self‑driven concurrency model that automates dependency handling to improve response latency and maintainability.

Performancebackendconcurrency
0 likes · 10 min read
Evolution of Grouped Concurrency Scheduling and the Self‑Driven Concurrency Model for E‑commerce Backend Services
Programmer DD
Programmer DD
May 3, 2022 · Backend Development

Mastering Spring Kafka Listeners: Containers, Concurrency, and @KafkaListener

This article explains how Spring Kafka’s KafkaMessageListenerContainer and ConcurrentMessageListenerContainer work, details their start-up process and internal consumer threads, shows how @KafkaListener bridges business logic, and provides configuration examples for single‑message and batch processing in Spring Boot.

JavaKafkaMessage Listener
0 likes · 11 min read
Mastering Spring Kafka Listeners: Containers, Concurrency, and @KafkaListener
Sanyou's Java Diary
Sanyou's Java Diary
May 3, 2022 · Backend Development

Mastering Java Thread Pools: Architecture, Lifecycle, and Customization

This comprehensive guide explains the concept, construction, execution flow, thread reuse, task timeout, pool states, shutdown mechanisms, monitoring methods, and practical customization strategies for Java ThreadPoolExecutor, helping developers design efficient and safe thread pools for real‑world applications.

Java MultithreadingThreadPoolExecutorconcurrency
0 likes · 16 min read
Mastering Java Thread Pools: Architecture, Lifecycle, and Customization
Su San Talks Tech
Su San Talks Tech
May 2, 2022 · Fundamentals

12 Real-World Java Concurrency Scenarios Every Developer Should Master

This article explores twelve practical multithreading use cases in Java, ranging from simple scheduled tasks and listeners to Excel imports, remote call aggregation, user context handling, MDC logging, high‑concurrency simulation, Kafka message processing, atomic counters, and delayed jobs, providing code examples and best‑practice tips for each scenario.

JavaThreadPoolconcurrency
0 likes · 25 min read
12 Real-World Java Concurrency Scenarios Every Developer Should Master
Cognitive Technology Team
Cognitive Technology Team
Apr 30, 2022 · Fundamentals

Java Thread States and How to Query Them

This article explains Java’s six thread states—NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, and TERMINATED—provides detailed descriptions, shows how to inspect thread states using jstack and online tools, and includes example thread dumps for practical analysis.

Javaconcurrencyjstack
0 likes · 6 min read
Java Thread States and How to Query Them
dbaplus Community
dbaplus Community
Apr 30, 2022 · Backend Development

Master the Five ‘Optimization Secrets’: Pooling, Sequencing, Batching, Reduction, and Concurrency

This article presents five practical performance‑optimization principles—pooling, sequential I/O, batching, reduction, and concurrency—explaining their rationale, real‑world examples such as object pools, ordered reads, batch APIs in MySQL/Redis/Kafka, sharding strategies, read/write separation, and common concurrency anomalies, while highlighting trade‑offs and implementation tips.

Optimizationbackendconcurrency
0 likes · 19 min read
Master the Five ‘Optimization Secrets’: Pooling, Sequencing, Batching, Reduction, and Concurrency
Top Architect
Top Architect
Apr 29, 2022 · Backend Development

Understanding Spring MVC Controller Singleton Scope and Thread Safety

The article explains that Spring MVC Controllers are singleton beans by default, discusses the thread‑safety risks of using instance variables in such Controllers, and presents several solutions—including prototype scope, ThreadLocal, and AtomicInteger—to ensure safe concurrent handling of requests.

ControllerJavaThread Safety
0 likes · 7 min read
Understanding Spring MVC Controller Singleton Scope and Thread Safety
IT Architects Alliance
IT Architects Alliance
Apr 29, 2022 · Fundamentals

Why Your Java Producer‑Consumer Code Deadlocks and How to Fix It

This article explains the root causes of thread‑safety problems in Java producer‑consumer scenarios, demonstrates how race conditions and deadlocks arise, and provides step‑by‑step solutions using synchronized blocks, wait/notify, notifyAll, and explicit Lock with Condition objects.

DeadlockJavaLock
0 likes · 20 min read
Why Your Java Producer‑Consumer Code Deadlocks and How to Fix It
IT Architects Alliance
IT Architects Alliance
Apr 29, 2022 · R&D Management

30 Essential Architecture Principles Every Software Architect Should Follow

This article presents thirty practical software‑architecture principles—from keeping designs simple and avoiding unnecessary features to mastering concurrency, distributed systems, and user experience—providing a comprehensive guide that helps architects make informed, ROI‑driven decisions while fostering scalable, maintainable solutions.

Design PrinciplesMVPR&D management
0 likes · 11 min read
30 Essential Architecture Principles Every Software Architect Should Follow
MaGe Linux Operations
MaGe Linux Operations
Apr 28, 2022 · Backend Development

How to Prevent HTTP 429 Errors with a Simple Go Request Queue

This article explains how to avoid HTTP 429 rate‑limit errors when calling third‑party APIs by wrapping each request in a struct and processing them through a channel‑based request queue written in Go, complete with usage examples and optional throttling.

APIGoRequest Queue
0 likes · 5 min read
How to Prevent HTTP 429 Errors with a Simple Go Request Queue
Top Architect
Top Architect
Apr 27, 2022 · Fundamentals

Understanding Thread Safety, Synchronization, and Locks in Java

This article explains the fundamentals of thread safety in Java, illustrating common pitfalls in producer‑consumer scenarios, demonstrating how synchronized, wait/notify, and the explicit Lock/Condition mechanisms can be used to avoid data races, deadlocks, and inconsistent state while providing complete code examples.

JavaLockThread Safety
0 likes · 20 min read
Understanding Thread Safety, Synchronization, and Locks in Java
Programmer DD
Programmer DD
Apr 27, 2022 · Fundamentals

8 Little‑Known Java APIs That Can Supercharge Your Code

This article introduces eight lesser-known but highly useful Java APIs—including DelayQueue, the “B” DateTimeFormatter pattern, StampedLock, LongAccumulator, HexFormat, binarySearch, BitSet, and Phaser—explaining their purpose, usage, and providing code snippets that demonstrate how they can simplify concurrency, time handling, and data manipulation.

APIJavaadvanced
0 likes · 9 min read
8 Little‑Known Java APIs That Can Supercharge Your Code
Top Architect
Top Architect
Apr 25, 2022 · Backend Development

Comprehensive Guide to Disruptor: Core Concepts, Implementation, and Demo in Java

This article introduces the high‑performance Disruptor library, explains its background, core concepts such as RingBuffer, Sequence, Sequencer, and WaitStrategy, and provides a step‑by‑step Java implementation with Maven dependencies, event factories, handlers, producers, and a runnable test case.

DisruptorHighPerformanceJava
0 likes · 12 min read
Comprehensive Guide to Disruptor: Core Concepts, Implementation, and Demo in Java
Cognitive Technology Team
Cognitive Technology Team
Apr 25, 2022 · Backend Development

Preventing ThreadLocal Information Loss in Multithreaded Java Applications by Implementing Custom Runnable and Callable (Hystrix Example)

This article explains why ThreadLocal variables can lose their values when used across thread pools, and demonstrates how to create custom Runnable and Callable wrappers that propagate HystrixRequestContext to ensure reliable ThreadLocal transmission in multithreaded Java environments.

ContextPropagationHystrixJava
0 likes · 8 min read
Preventing ThreadLocal Information Loss in Multithreaded Java Applications by Implementing Custom Runnable and Callable (Hystrix Example)
Code Ape Tech Column
Code Ape Tech Column
Apr 25, 2022 · Backend Development

Deep Dive into Java ForkJoinPool: Design, Implementation, and Usage

This article explains the divide‑and‑conquer principle, the internal design of Java's ForkJoinPool, its core classes (ForkJoinTask, ForkJoinWorkerThread, WorkQueue), key methods for task submission, work stealing, thread management, and provides practical code examples to illustrate how to implement and use fork/join parallelism effectively.

ForkJoinPoolJavaParallelism
0 likes · 48 min read
Deep Dive into Java ForkJoinPool: Design, Implementation, and Usage
Cognitive Technology Team
Cognitive Technology Team
Apr 24, 2022 · Backend Development

Pitfalls of Using ThreadLocal for User Context in Java Applications

Using ThreadLocal to store user information in Java web applications can lead to hidden failures such as loss of context and memory leaks, especially when thread pools are involved, so developers should restrict its usage to controller threads and employ static analysis tools to detect improper usage.

JavaMemoryLeakThreadLocal
0 likes · 4 min read
Pitfalls of Using ThreadLocal for User Context in Java Applications
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 22, 2022 · Fundamentals

Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs

The Linux kernel’s mutex is a sleeping lock that serializes access by sleeping threads, enforces strict ownership rules, uses a state flag with a wait list and per‑CPU optimistic spin queue, offers APIs like mutex_init, lock, unlock and trylock, and employs handoff and MCS‑style spinning to improve performance, with OPPO’s team optimizing it to reduce UI jank.

Linux kernelconcurrencymutex
0 likes · 16 min read
Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs
Top Architect
Top Architect
Apr 22, 2022 · Backend Development

Understanding Mutual Exclusion and Idempotency in Distributed Systems: Distributed Locks, ReentrantLock, Zookeeper, Redis, and GTIS

This article explains the mutual‑exclusion and idempotency challenges in distributed environments, analyzes multi‑thread and multi‑process solutions, introduces the principles and implementations of distributed locks (including ReentrantLock, synchronized, Zookeeper, Redis, Tair, and the Cerberus framework), and presents GTIS as a reliable idempotency guard.

JavaRedisZookeeper
0 likes · 32 min read
Understanding Mutual Exclusion and Idempotency in Distributed Systems: Distributed Locks, ReentrantLock, Zookeeper, Redis, and GTIS
Zhuanzhuan Tech
Zhuanzhuan Tech
Apr 20, 2022 · Backend Development

Transaction Middleware: FSM and Concurrency Model Practices and Exploration

This article examines the challenges faced by a transaction middleware platform, introduces a finite‑state‑machine (FSM) solution for order state flows, and compares traditional serial processing with future‑based staged concurrency and event‑driven concurrency models, highlighting their benefits and trade‑offs.

Finite State MachineFutureMiddleware
0 likes · 11 min read
Transaction Middleware: FSM and Concurrency Model Practices and Exploration
Selected Java Interview Questions
Selected Java Interview Questions
Apr 19, 2022 · Backend Development

Implementing Distributed Locks in Java: Database, Redis, and Zookeeper Solutions

This article explains the concept of distributed locks, compares three common implementation schemes—database unique indexes, Redis SETNX, and Zookeeper temporary sequential nodes—and provides complete Java code examples for each, along with analysis of re‑entrancy, lock release timing, and single‑point failures.

Zookeeperbackendconcurrency
0 likes · 13 min read
Implementing Distributed Locks in Java: Database, Redis, and Zookeeper Solutions
macrozheng
macrozheng
Apr 19, 2022 · Backend Development

Why Java Virtual Threads Are a Game-Changer for High-Concurrency Backends

Java virtual threads, introduced in JEP 425, provide a lightweight, low‑cost alternative to traditional platform threads, enabling massive concurrency without the overhead of OS threads, improving throughput for server‑side applications while preserving familiar APIs and enhancing observability.

JEP425JavaThread API
0 likes · 9 min read
Why Java Virtual Threads Are a Game-Changer for High-Concurrency Backends
Python Programming Learning Circle
Python Programming Learning Circle
Apr 15, 2022 · Fundamentals

Why Python Struggles with Large Projects: Variable Declarations, Module Management, Dependencies, and Concurrency

The article examines the challenges of using Python for large-scale projects, highlighting issues such as implicit variable declarations, complex module dependencies, version conflicts, the Global Interpreter Lock, and concurrency limitations, while comparing Python to languages like C, Go, and Java.

GILLanguage comparisonModules
0 likes · 13 min read
Why Python Struggles with Large Projects: Variable Declarations, Module Management, Dependencies, and Concurrency
Java High-Performance Architecture
Java High-Performance Architecture
Apr 13, 2022 · Backend Development

Mastering Asynchronous Execution in Spring Boot: From @Async to CompletableFuture

This article explains multiple ways to implement asynchronous processing in Spring Boot, covering @Async annotation, CompletableFuture, supplyAsync, runAsync, WebAsyncTask, DeferredResult, custom interceptors, and server configuration tweaks such as Tomcat connection limits and switching to Undertow.

AsynchronousCompletableFutureJava
0 likes · 11 min read
Mastering Asynchronous Execution in Spring Boot: From @Async to CompletableFuture
MaGe Linux Operations
MaGe Linux Operations
Apr 12, 2022 · Backend Development

Understanding Go’s CSP Model: Goroutine, Channel, Scheduler

This article explains Go’s concurrency fundamentals, distinguishing concurrency from parallelism, describing the CSP model built on goroutines and channels, and detailing the underlying M‑P‑G scheduler architecture—including thread models, runqueues, and load balancing—providing a comprehensive overview for developers.

CSPGochannel
0 likes · 11 min read
Understanding Go’s CSP Model: Goroutine, Channel, Scheduler
Baidu Geek Talk
Baidu Geek Talk
Apr 12, 2022 · Backend Development

Five Practical Go Tips: Ballast Optimization, Benchmark & pprof, Testing Stubs, OOM Caused by Locks, and Memory Synchronization in Concurrency

This guide presents five practical Go techniques—using a large ballast slice to control GC timing, leveraging benchmark and pprof for performance profiling, applying the monkey library for test stubbing, avoiding unreleased locks that cause OOM, and employing proper synchronization primitives to prevent stale memory reads.

Goconcurrencytesting
0 likes · 12 min read
Five Practical Go Tips: Ballast Optimization, Benchmark & pprof, Testing Stubs, OOM Caused by Locks, and Memory Synchronization in Concurrency
Java High-Performance Architecture
Java High-Performance Architecture
Apr 10, 2022 · Backend Development

Mastering Redis Distributed Locks with Jedis: Build a 100k-User Flash Sale Simulation

This article demonstrates how to implement Redis distributed locks using Jedis in Java, covering lock creation with SETNX, lock release via Lua scripts, and a high‑concurrency flash‑sale simulation with 100,000 virtual users, illustrating key concepts such as lock expiration, atomic operations, and performance testing.

JavaRedisSpringBoot
0 likes · 10 min read
Mastering Redis Distributed Locks with Jedis: Build a 100k-User Flash Sale Simulation
Cognitive Technology Team
Cognitive Technology Team
Apr 9, 2022 · Backend Development

When Does ThreadPoolExecutor’s RejectedExecutionHandler Trigger and How to Use Its Implementations in Java

This article explains the conditions that cause ThreadPoolExecutor’s RejectedExecutionHandler to fire, reviews the built‑in policies such as DiscardOldestPolicy, AbortPolicy, CallerRunsPolicy and DiscardPolicy, provides their source code, and offers practical advice on selecting and avoiding pitfalls when handling rejected tasks in Java concurrency.

JavaRejectedExecutionHandlerThreadPoolExecutor
0 likes · 5 min read
When Does ThreadPoolExecutor’s RejectedExecutionHandler Trigger and How to Use Its Implementations in Java
Baidu Geek Talk
Baidu Geek Talk
Apr 8, 2022 · Artificial Intelligence

Golang Object Pool for Reducing GC Pressure, FFmpeg Concurrency Control, and Paddle Static vs. Dynamic Graphs

The article explains how Go's lock‑free sync.Pool can cut garbage‑collection overhead, shows practical FFmpeg thread‑parameter tuning that balances CPU use and latency for video filtering versus encoding, and compares PaddlePaddle's static and dynamic graph modes, including debugging tips and conversion to static.

Deep LearningDynamic GraphStatic Graph
0 likes · 13 min read
Golang Object Pool for Reducing GC Pressure, FFmpeg Concurrency Control, and Paddle Static vs. Dynamic Graphs
Efficient Ops
Efficient Ops
Apr 6, 2022 · Operations

How Many TCP Connections Can One Server Really Handle? A Deep Dive

This article demystifies the common confusion about a server’s maximum concurrent TCP connections, explaining the theoretical limits of the TCP four‑tuple, Linux file‑descriptor restrictions, kernel buffer settings, and demonstrates achieving one million active connections through careful configuration and tuning.

Server TuningTCPconcurrency
0 likes · 7 min read
How Many TCP Connections Can One Server Really Handle? A Deep Dive
IT Architects Alliance
IT Architects Alliance
Apr 5, 2022 · Backend Development

Understanding Java Timers, DelayQueue, ScheduledThreadPoolExecutor, and Time‑Wheel Algorithms

This article explains the concepts, use cases, and internal implementations of Java's Timer, DelayQueue, and ScheduledThreadPoolExecutor, compares their performance characteristics, and introduces the time‑wheel scheduling algorithm—including hierarchical wheels—to address scalability challenges in high‑volume timed‑task systems.

DelayQueueJavaScheduledThreadPoolExecutor
0 likes · 12 min read
Understanding Java Timers, DelayQueue, ScheduledThreadPoolExecutor, and Time‑Wheel Algorithms
IT Services Circle
IT Services Circle
Apr 3, 2022 · Backend Development

Four Ways to Determine When a Java ThreadPool Has Completed All Tasks

This article explains four practical techniques—using isTerminated, comparing task counts, CountDownLatch, and CyclicBarrier—to reliably detect when a Java ThreadPoolExecutor has finished executing all submitted tasks, including code examples, advantages, disadvantages, and a summary of each method.

CountDownLatchCyclicBarrierJava
0 likes · 12 min read
Four Ways to Determine When a Java ThreadPool Has Completed All Tasks