Tagged articles

concurrency

2156 articles · Page 12 of 22
Dada Group Technology
Dada Group Technology
Aug 19, 2022 · Backend Development

Improving High‑Concurrency System Performance with Coroutines and the Quasar Framework

The article analyzes the high load and low CPU utilization problems of a Java service, compares various I/O models, introduces coroutine fundamentals and the Quasar library, demonstrates practical migration steps with code examples, and evaluates the performance gains and risks of adopting coroutine‑based concurrency.

BackendIO ModelQuasar
0 likes · 19 min read
Improving High‑Concurrency System Performance with Coroutines and the Quasar Framework
Su San Talks Tech
Su San Talks Tech
Aug 19, 2022 · Fundamentals

Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools

This comprehensive guide explores Java concurrency fundamentals, covering thread creation, lifecycle, synchronization mechanisms, lock implementations, thread-local storage, memory model, atomic classes, common concurrency utilities, and detailed explanations of thread pools, their configurations, states, and best practices, accompanied by over sixty interview-style questions and code examples.

JavaLockSynchronization
0 likes · 81 min read
Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools
Java Architect Essentials
Java Architect Essentials
Aug 18, 2022 · Backend Development

Batch Processing with Multithreading in Java: Splitting Large Collections and Using Thread Pools

This article explains how to efficiently handle massive data batch updates in Java by splitting large collections into smaller chunks, processing them concurrently with a configurable ThreadPoolExecutor, and controlling execution order, while providing reusable utility code and practical implementation examples.

ApacheCommonsBatchProcessingGuava
0 likes · 8 min read
Batch Processing with Multithreading in Java: Splitting Large Collections and Using Thread Pools
21CTO
21CTO
Aug 18, 2022 · Cloud Native

Why Go (Golang) Is the Go‑To Language for Cloud‑Native Development

This article explores Go's concise design, strong concurrency model, fast compilation, static binaries, and broad ecosystem, highlighting its ideal fit for cloud‑native applications, distributed services, and command‑line tools while also addressing its limitations and future direction.

GoGolangStatic Binaries
0 likes · 12 min read
Why Go (Golang) Is the Go‑To Language for Cloud‑Native Development
Su San Talks Tech
Su San Talks Tech
Aug 14, 2022 · Backend Development

9 Hidden Pitfalls When Converting Synchronous Code to Multithreaded Execution

Switching from single‑threaded synchronous calls to multithreaded asynchronous execution can boost performance, but it also introduces nine common problems—including missing return values, data loss, ordering issues, thread‑safety bugs, ThreadLocal anomalies, OOM, high CPU usage, transaction failures, and service crashes—that developers must understand and mitigate.

JavaThreadLocalTransaction
0 likes · 19 min read
9 Hidden Pitfalls When Converting Synchronous Code to Multithreaded Execution
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 12, 2022 · Fundamentals

Understanding Linux rwsem: Mechanisms, Data Structures, and Optimistic Spinning

Linux rwsem is a read‑write semaphore that lets multiple readers or a single writer hold the lock, using a count field, owner pointer, optimistic‑spin queue (osq), and protected wait list; it provides fast, medium, and slow acquisition paths with handoff and optimistic spinning to reduce sleep latency compared to mutexes and spinlocks.

Linux kernelSynchronizationconcurrency
0 likes · 16 min read
Understanding Linux rwsem: Mechanisms, Data Structures, and Optimistic Spinning
Python Crawling & Data Mining
Python Crawling & Data Mining
Aug 11, 2022 · Fundamentals

Why Python Multiprocessing Needs target=func Without Parentheses

This article explains a common Python multiprocessing pitfall, showing how using target=function_name without parentheses correctly launches a new process, and illustrates the difference between passing a function object versus calling the function, accompanied by screenshots of the discussion, runtime output, and a concise solution.

Multiprocessingconcurrencythreading
0 likes · 3 min read
Why Python Multiprocessing Needs target=func Without Parentheses
Code Ape Tech Column
Code Ape Tech Column
Aug 4, 2022 · Backend Development

Understanding Redisson Distributed Lock Implementation

This article provides a comprehensive, step‑by‑step analysis of Redisson’s distributed lock implementation, covering its architecture, Lua scripts for lock acquisition, re‑entrancy, watchdog renewal, unlocking, fair lock mechanisms, and code examples, enabling developers to grasp and apply robust Redis‑based locking in Java applications.

Distributed LockJavaLua
0 likes · 31 min read
Understanding Redisson Distributed Lock Implementation
ITPUB
ITPUB
Jul 31, 2022 · Fundamentals

What Really Happens Inside Java’s synchronized? A Deep Dive into JVM Lock Mechanisms

This article examines the inner workings of Java’s synchronized keyword by analyzing HotSpot 1.8 source code, revealing how lightweight, heavyweight, biased, and adaptive spin locks operate, how lock inflation occurs, and how the JVM manages monitor objects, CAS operations, and thread queues to implement synchronization.

JavaMonitorconcurrency
0 likes · 17 min read
What Really Happens Inside Java’s synchronized? A Deep Dive into JVM Lock Mechanisms
Selected Java Interview Questions
Selected Java Interview Questions
Jul 29, 2022 · Backend Development

Seven Directions of Code Performance Optimization for Java Backend

This article outlines seven major areas of Java backend performance optimization—including reuse, computation, result‑set, resource‑conflict, algorithm, efficient implementation, and JVM tuning—explaining concepts, techniques, and practical examples to help developers improve application speed and resource utilization.

BackendJavaOptimization
0 likes · 11 min read
Seven Directions of Code Performance Optimization for Java Backend
Top Architect
Top Architect
Jul 29, 2022 · Fundamentals

Understanding TCP Connection Limits and the Role of Port Numbers

The article explains how TCP connections are identified by a four‑tuple, why the 65535 port limit does not directly cap concurrent connections, the theoretical maximum connections for client and server roles, and how real‑world limits are governed by memory, file descriptors, and port reuse on Linux systems.

TCPconcurrencyport limits
0 likes · 11 min read
Understanding TCP Connection Limits and the Role of Port Numbers
Su San Talks Tech
Su San Talks Tech
Jul 28, 2022 · Backend Development

Asynchronous Java Programming: Threads, Futures, CompletableFuture & Spring @Async

This article introduces asynchronous programming concepts in Java, explaining how multithreading, Future, FutureTask, CompletableFuture, and Spring's @Async annotation can transform synchronous workflows into high‑throughput, low‑latency solutions, with code examples and practical guidance for implementing each technique.

CompletableFutureJavaSpring Boot
0 likes · 17 min read
Asynchronous Java Programming: Threads, Futures, CompletableFuture & Spring @Async
FunTester
FunTester
Jul 27, 2022 · Backend Development

How Java’s DelayQueue Handles Million‑QPS Loads: Performance Test Insights

This article examines the implementation of java.util.concurrent.DelayQueue for high‑throughput performance testing, presents a custom Delayed object, shares benchmark code and results across various thread counts, and concludes that DelayQueue can sustain several million QPS when properly tuned.

BenchmarkDelayQueueJava
0 likes · 7 min read
How Java’s DelayQueue Handles Million‑QPS Loads: Performance Test Insights
Top Architect
Top Architect
Jul 25, 2022 · Backend Development

Using @Scheduled in Spring Boot for Task Scheduling: Configuration, Parameters, and Multi‑threading

This article explains how to create and configure Spring Boot scheduled tasks with @Scheduled, covering property‑based settings, cron expressions, fixed‑rate and fixed‑delay options, the required @EnableScheduling annotation, and how to switch from the default single‑thread executor to a multi‑threaded pool for concurrent execution.

JavaSpring Bootconcurrency
0 likes · 9 min read
Using @Scheduled in Spring Boot for Task Scheduling: Configuration, Parameters, and Multi‑threading
Cognitive Technology Team
Cognitive Technology Team
Jul 24, 2022 · Fundamentals

Introduction to ThreadLocal in Java

ThreadLocal provides thread confinement in Java, allowing each thread to hold its own independent variable, which is useful for scenarios such as database connection isolation, transaction storage, lock-free concurrency, implicit parameter passing across functions, and highlights common pitfalls like information loss in thread pools and OOM risks.

Implicit ParametersJavaThreadLocal
0 likes · 5 min read
Introduction to ThreadLocal in Java
Cognitive Technology Team
Cognitive Technology Team
Jul 23, 2022 · Backend Development

Understanding FutureTask: Features, Implementation, and Common Pitfalls

FutureTask acts as a proxy for asynchronous tasks in Java, providing result retrieval with optional timeout, completion checks, cancellation, and repeat execution, while managing task state, outcomes, and exceptions; the article illustrates usage, internal fields, and common pitfalls such as missed exceptions and indefinite blocking.

ExceptionHandlingFutureTaskJava
0 likes · 5 min read
Understanding FutureTask: Features, Implementation, and Common Pitfalls
Top Architect
Top Architect
Jul 22, 2022 · Backend Development

Understanding ExecutorCompletionService: Root Cause Analysis and Best Practices

This article analyzes a production outage caused by misuse of ExecutorCompletionService, explains the underlying Java concurrency mechanisms, compares it with ExecutorService, provides correct code examples, and offers practical guidelines to avoid memory leaks and improve backend reliability.

ExecutorCompletionServiceJavaOOM
0 likes · 12 min read
Understanding ExecutorCompletionService: Root Cause Analysis and Best Practices
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.

JavaThreadPoolExecutorconcurrency
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.

Backendconcurrencyidempotency
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.

LocksPerformanceSynchronization
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.

Backend DevelopmentJavaThreadPoolExecutor
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.

BackendCompletableFutureJava
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.

Distributed LockJavaLua
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.

JavaSynchronizationconcurrency
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.

BackendDatabaseDistributed Lock
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.

JavaReentrantLockSingleton
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.

CPUMESIcache coherence
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.

Backend DevelopmentDisruptorJava
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.

GoLockingParameter Passing
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.

JavaLockSynchronization
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.

Programming Conceptsasynchronous programmingconcurrency
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.

JavaLocksThreads
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.

JavaThreadLocalTransmittableThreadLocal
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.

Backend DevelopmentGroovyJava
0 likes · 5 min read
How Fast Can Apache Commons Pool2 Run? A Deep Performance Test
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.

CompletableFutureJavaJava8
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.

BackendDistributed LockMySQL
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.

BackendJavaThreadLocal
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
Cognitive Technology Team
Cognitive Technology Team
May 21, 2022 · Fundamentals

Cooperative Thread Cancellation in Java: Flags and Interrupts

The article explains that Java lacks a safe preemptive way to stop threads and describes two cooperative cancellation mechanisms—using a volatile cancellation flag and using thread interruption—along with code examples and practical considerations for each approach.

Javacancellationconcurrency
0 likes · 5 min read
Cooperative Thread Cancellation in Java: Flags and Interrupts
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().

JavaMemory Modelconcurrency
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.

Backend DevelopmentCopy-on-WriteCopyOnWriteArrayList
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.

BackendErrGroupError handling
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.

CompletableFutureJavaasynchronous
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.

BackendPerformanceconcurrency
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.

BackendMicroservicesPerformance
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.

Backend DevelopmentJavaKafka
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.

Javaconcurrencymultithreading
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.

BackendOptimizationconcurrency
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.

Backend DevelopmentControllerJava
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.

MVPR&D ManagementSoftware Architecture
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.

JavaLockSynchronization
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.

APIAdvancedJava
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