Tagged articles
2072 articles
Page 14 of 21
Programmer DD
Programmer DD
Aug 15, 2021 · Fundamentals

Is Java’s long and double Access Truly Atomic? A Deep Dive

Through a multithreaded test program, this article explores whether Java’s 64‑bit long and double types are accessed atomically on 32‑bit and 64‑bit JVMs, explains the JVM memory model rules, and shows how volatility and hardware affect atomicity.

JVMLongatomicity
0 likes · 10 min read
Is Java’s long and double Access Truly Atomic? A Deep Dive
Programmer DD
Programmer DD
Aug 12, 2021 · Backend Development

How to Build a Simple Token Bucket RateLimiter in Java

This article provides an overview of the token bucket algorithm, demonstrates a straightforward Java implementation of a RateLimiter with code examples, compares it to Guava's RateLimiter internals, and includes diagrams and test results to illustrate its behavior.

GuavaRateLimiterToken Bucket
0 likes · 4 min read
How to Build a Simple Token Bucket RateLimiter in Java
Java Architect Essentials
Java Architect Essentials
Aug 11, 2021 · Backend Development

Understanding Java ThreadPoolExecutor: Creation, Configuration, and Execution Logic

This article explains the concept, purpose, and internal workings of Java's ThreadPoolExecutor, covering thread lifecycle, pool creation parameters, common blocking queues, thread factories, rejection policies, and the execute() method with code examples to help developers efficiently manage concurrent tasks.

BackendExecutorServiceThreadPool
0 likes · 6 min read
Understanding Java ThreadPoolExecutor: Creation, Configuration, and Execution Logic
Top Architect
Top Architect
Aug 11, 2021 · Fundamentals

Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java

This article explains why the Thread.stop and Thread.suspend methods were deprecated in modern Java, demonstrates the problems they cause with concrete code examples, and presents two safe alternatives—using a shared flag and the interrupt mechanism—to gracefully terminate threads without risking deadlocks or resource leaks.

DeprecatedStopSuspend
0 likes · 10 min read
Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java
Top Architect
Top Architect
Aug 10, 2021 · Backend Development

Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger

This article explains four Java concurrency utilities—CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—detailing their concepts, typical use cases, and providing complete code examples that demonstrate synchronization patterns such as thread coordination, resource limiting, and data exchange.

CountDownLatchCyclicBarrierExchanger
0 likes · 13 min read
Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger
Code Ape Tech Column
Code Ape Tech Column
Aug 8, 2021 · Backend Development

Master Spring @Async: Custom Thread Pools and Real-World Usage

This guide explains how Spring's @Async annotation works, compares built-in executors, shows how to configure custom thread pools via AsyncConfigurer or AsyncConfigurerSupport, and demonstrates various async method signatures including void, Future and CompletableFuture with practical code examples.

AsyncBackendThreadPool
0 likes · 9 min read
Master Spring @Async: Custom Thread Pools and Real-World Usage
Top Architect
Top Architect
Aug 7, 2021 · Backend Development

Understanding Java ThreadPoolExecutor: Creation, Parameters, and Execution Flow

The article explains why multithreading is essential for modern CPUs, introduces thread pools to reduce overhead, and details Java's ThreadPoolExecutor creation parameters, execution process, and core methods such as addWorker, runWorker, and getTask, using JDK 1.8 source code examples.

ThreadPoolExecutorbackend-developmentconcurrency
0 likes · 7 min read
Understanding Java ThreadPoolExecutor: Creation, Parameters, and Execution Flow
Java Interview Crash Guide
Java Interview Crash Guide
Aug 5, 2021 · Backend Development

Mastering Java ThreadPoolExecutor: 4 Rejection Policies Explained & When to Use Them

Java's ThreadPoolExecutor offers four rejection policies—AbortPolicy, DiscardPolicy, DiscardOldestPolicy, and CallerRunsPolicy—each handling task overflow differently; this article explains their behavior, default setting, code examples, and how to configure them via Spring's ThreadPoolTaskExecutor for various business scenarios.

RejectionPolicyThreadPoolExecutorconcurrency
0 likes · 9 min read
Mastering Java ThreadPoolExecutor: 4 Rejection Policies Explained & When to Use Them
Wukong Talks Architecture
Wukong Talks Architecture
Aug 4, 2021 · Databases

Understanding MySQL InnoDB Locks: Shared, Exclusive, Intention, Gap, Next‑Key, Auto‑Inc, and Predicate Locks

The article presents a detailed interview‑style walkthrough of MySQL InnoDB locking mechanisms, covering table‑ versus row‑level locks, shared and exclusive locks, intention locks, gap and next‑key locks, auto‑increment locks, predicate locks, and related SQL statements, illustrated with tables and code examples.

InnoDBLocksconcurrency
0 likes · 13 min read
Understanding MySQL InnoDB Locks: Shared, Exclusive, Intention, Gap, Next‑Key, Auto‑Inc, and Predicate Locks
360 Tech Engineering
360 Tech Engineering
Aug 3, 2021 · Fundamentals

Common Go Pitfalls: Loop Variable Capture, := Scope, Goroutine Pools, and Struct Memory Alignment

This article examines several subtle Go programming issues—including unexpected loop variable addresses, the scope nuances of the := operator, proper handling of goroutine concurrency with worker pools, and how struct field ordering affects memory alignment—providing code examples and practical solutions to avoid these pitfalls.

GoGoroutineLoop Variable
0 likes · 15 min read
Common Go Pitfalls: Loop Variable Capture, := Scope, Goroutine Pools, and Struct Memory Alignment
Java Architect Essentials
Java Architect Essentials
Aug 2, 2021 · Backend Development

Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking

The article provides a comprehensive overview of Java garbage‑collection algorithms, JVM memory regions, object reachability analysis, the semantics of volatile, synchronized and ReentrantLock, thread‑pool creation and operation, deadlock examples, distributed‑lock strategies, and related tooling such as JUC utilities and Git conflict handling.

Garbage CollectionJVMLock
0 likes · 23 min read
Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking
Wukong Talks Architecture
Wukong Talks Architecture
Aug 1, 2021 · Backend Development

Types of Blocking Queues Used in Java Thread Pools

This article explains the different blocking queue implementations—ArrayBlockingQueue, LinkedBlockingQueue, SynchronousQueue, and PriorityBlockingQueue—used by Java thread pools, describing their structures, behavior, fairness settings, and performance characteristics for concurrent task execution.

ArrayBlockingQueueBackendBlockingQueue
0 likes · 6 min read
Types of Blocking Queues Used in Java Thread Pools
Selected Java Interview Questions
Selected Java Interview Questions
Jul 31, 2021 · Fundamentals

Understanding Java volatile, Memory Semantics, and the lock Prefix

This article explains the two core properties of Java's volatile keyword—visibility and ordering—how they are implemented via lock prefixes and memory barriers, compares volatile with synchronized and CAS, and details the underlying CPU cache‑coherency mechanisms such as MESI, store buffers, and invalidate queues.

Happens-beforeMESIMemory Model
0 likes · 13 min read
Understanding Java volatile, Memory Semantics, and the lock Prefix
Java Architect Essentials
Java Architect Essentials
Jul 28, 2021 · Fundamentals

Ensuring Ordered Execution of Java Threads Using join, Single‑Thread Executor, volatile, and Locks

This article explains why thread start order differs from execution order in Java and demonstrates four techniques—Thread.join, a single‑thread executor, a volatile flag, and ReentrantLock with conditions—to guarantee that multiple threads run and print their results in a deterministic sequence.

ExecutorServiceLockThread Join
0 likes · 10 min read
Ensuring Ordered Execution of Java Threads Using join, Single‑Thread Executor, volatile, and Locks
Su San Talks Tech
Su San Talks Tech
Jul 27, 2021 · Backend Development

Understanding Java Locks: Optimistic vs Pessimistic, Reentrant, Read‑Write, and More

This article explains the various Java lock mechanisms—including optimistic and pessimistic locks, exclusive and shared locks, reentrant, read‑write, fair/unfair, spin, segment locks, and lock‑escalation techniques—detailing their principles, Java implementations, usage scenarios, and optimization strategies.

Reentrant Lockconcurrencyoptimistic lock
0 likes · 13 min read
Understanding Java Locks: Optimistic vs Pessimistic, Reentrant, Read‑Write, and More
Programmer DD
Programmer DD
Jul 23, 2021 · Backend Development

Why ThreadLocalRandom Beats Random in Java: Deep Dive into Unsafe and Memory

This article explores the performance drawbacks of java.util.Random in high‑concurrency scenarios, explains how ThreadLocalRandom leverages Unsafe for per‑thread seeds, examines native getLong/putLong operations, and discusses memory layout nuances such as compressed oops and potential pitfalls.

ThreadLocalRandomconcurrencyjava
0 likes · 10 min read
Why ThreadLocalRandom Beats Random in Java: Deep Dive into Unsafe and Memory
Baidu Intelligent Testing
Baidu Intelligent Testing
Jul 22, 2021 · Backend Development

Performance Optimization Techniques for Baidu C++ Backend Services: Memory Access, Allocation, and Concurrency

This article presents a comprehensive collection of Baidu C++ engineers' performance‑optimization practices, covering memory‑access patterns, string handling, protobuf manipulation, allocator choices, job‑level memory arenas, cache‑line considerations, and memory‑order semantics to achieve substantial latency and cost reductions in large‑scale backend services.

backend-developmentconcurrencymemory allocation
0 likes · 32 min read
Performance Optimization Techniques for Baidu C++ Backend Services: Memory Access, Allocation, and Concurrency
Architects' Tech Alliance
Architects' Tech Alliance
Jul 19, 2021 · Fundamentals

Understanding Processes and Threads: Definitions, Differences, Advantages, and Practical Usage

This article explains the fundamental concepts of processes and threads in operating systems, compares their characteristics, outlines their respective advantages and disadvantages, and provides practical guidelines for choosing between multi‑process and multi‑thread designs in real‑world applications.

Operating SystemParallelismThread
0 likes · 20 min read
Understanding Processes and Threads: Definitions, Differences, Advantages, and Practical Usage
Programmer DD
Programmer DD
Jul 19, 2021 · Fundamentals

Is Java’s long Truly Atomic? Exploring JVM Memory Model Behavior

This article investigates whether long and double variables are atomic in the JVM, demonstrates non‑atomic behavior on 32‑bit HotSpot with a multithreaded test, explains the Java Memory Model rules, and shows that atomicity is guaranteed on 64‑bit JVMs or when using volatile.

JVMMemory Modelatomicity
0 likes · 9 min read
Is Java’s long Truly Atomic? Exploring JVM Memory Model Behavior
Top Architect
Top Architect
Jul 18, 2021 · Backend Development

Implementing Distributed Locks with Redis and Redisson in Java

The article explains why Java's synchronized lock cannot be used for distributed scenarios, demonstrates how to build a Redis‑based distributed lock with setIfAbsent, discusses pitfalls such as server crashes and lock expiration, and presents robust solutions including atomic expiration, thread‑ID verification, lock renewal, and Redisson usage.

concurrencyjavaredis
0 likes · 6 min read
Implementing Distributed Locks with Redis and Redisson in Java
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 16, 2021 · Backend Development

Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService

This article compares Java's Timer and ScheduledExecutorService for scheduling tasks, explains their internal workings, demonstrates common pitfalls, and provides multiple code examples showing how to schedule one‑off, fixed‑rate, and fixed‑delay tasks using both Runnable and Callable.

Scheduled TasksScheduledExecutorServiceThreadPool
0 likes · 8 min read
Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService
Alibaba Cloud Developer
Alibaba Cloud Developer
Jul 13, 2021 · Fundamentals

How I Learned Go in 3 Days: A Practical Jump from Java to Go

This article walks through a rapid three‑day Go onboarding, covering installation, environment setup, core syntax, package management with Go modules, common development tools, and a simple producer‑consumer concurrency example, while comparing Go concepts to Java and JavaScript.

BackendModulesconcurrency
0 likes · 27 min read
How I Learned Go in 3 Days: A Practical Jump from Java to Go
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 10, 2021 · Backend Development

Concurrent Unit Testing of AssetService.update with Optimization Techniques

This article explains how to write a concurrent unit test for the AssetService.update method using thread pools, CountDownLatch, AtomicInteger, and then suggests optimizations such as replacing AtomicInteger with LongAdder and employing CyclicBarrier to increase contention, providing full code examples and detailed explanations.

AtomicIntegerCyclicBarrierThreadPool
0 likes · 9 min read
Concurrent Unit Testing of AssetService.update with Optimization Techniques
Sohu Tech Products
Sohu Tech Products
Jun 30, 2021 · Mobile Development

Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android

This article explains how Kotlin coroutines simplify asynchronous programming on Android by using suspension, detailing core concepts, APIs, dispatchers, suspend functions, and the underlying implementation through decompiled bytecode and continuation‑passing style, complemented by practical code examples and execution logs.

AndroidCoroutinesKotlin
0 likes · 34 min read
Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android
Liangxu Linux
Liangxu Linux
Jun 27, 2021 · Backend Development

How to Process a 16 GB Log File in Seconds with Go

This tutorial explains how to extract logs from a 16 GB file in about 25 seconds by reading the file in chunks, reusing buffers with sync.Pool, and processing those chunks concurrently with Go goroutines, avoiding full‑memory loads or slow line‑by‑line scans.

File ProcessingGoconcurrency
0 likes · 9 min read
How to Process a 16 GB Log File in Seconds with Go
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 27, 2021 · Fundamentals

Understanding Java Thread States and Their Transitions

This article explains Java thread lifecycle states, detailing the six JVM-defined states (NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, TERMINATED), their transitions, and the finer distinction between READY and RUNNING within the RUNNABLE state, while clarifying why Java does not define a separate RUNNING state.

JVMThreadStateconcurrency
0 likes · 6 min read
Understanding Java Thread States and Their Transitions
Programmer DD
Programmer DD
Jun 27, 2021 · Backend Development

Mastering Java Thread Pools: Core Pool, BlockingQueue, and Real-World Tuning

This article explains how Java thread pools work, clarifies common misconceptions about core thread creation, details the role of BlockingQueue, and provides practical guidelines for sizing core, max threads, and queue capacity based on concurrency and GC considerations.

BlockingQueueconcurrencyperformance
0 likes · 11 min read
Mastering Java Thread Pools: Core Pool, BlockingQueue, and Real-World Tuning
macrozheng
macrozheng
Jun 25, 2021 · Fundamentals

Mastering Java Random Number Generation: Random, ThreadLocalRandom, SecureRandom & Math

This article reviews four Java random number generation techniques—Random, ThreadLocalRandom, SecureRandom, and Math.random()—detailing their usage, underlying algorithms, thread‑safety, performance trade‑offs, and appropriate scenarios, helping developers choose the right tool for their applications.

Math.randomRandom Number GenerationSecureRandom
0 likes · 15 min read
Mastering Java Random Number Generation: Random, ThreadLocalRandom, SecureRandom & Math
JD Retail Technology
JD Retail Technology
Jun 24, 2021 · Backend Development

Understanding Java Thread Pools: Concepts, Advantages, and Implementation Details

This article explains the concept of thread pools, their performance benefits, the three native Java pool implementations, detailed internal mechanisms of ThreadPoolExecutor, task queue choices, rejection policies, and practical tuning advice for real‑world applications such as Tomcat and custom frameworks.

ExecutorServiceThread ManagementThreadPool
0 likes · 13 min read
Understanding Java Thread Pools: Concepts, Advantages, and Implementation Details
21CTO
21CTO
Jun 18, 2021 · Frontend Development

Do HTTP/2’s Multiplexing Still Need Image Sprites? Experimental Insights

This article presents a series of experiments comparing HTTP/1.1 and HTTP/2 request merging versus splitting, analyzing how concurrency, multiplexing, and header compression affect page load times for small images, large assets, and JavaScript under various network conditions.

HTTP/2Network ProtocolsWeb Performance
0 likes · 15 min read
Do HTTP/2’s Multiplexing Still Need Image Sprites? Experimental Insights
21CTO
21CTO
Jun 16, 2021 · Backend Development

How to Process a 16 GB Log File in Seconds with Go Concurrency

This article explains how to efficiently extract time‑range logs from a massive 16 GB .txt/.log file using Go's bufio.NewReader, sync.Pool for buffer reuse, and concurrent goroutines, achieving processing times of around 25 seconds.

Log Processingconcurrencylarge files
0 likes · 9 min read
How to Process a 16 GB Log File in Seconds with Go Concurrency
Baidu Geek Talk
Baidu Geek Talk
Jun 16, 2021 · Fundamentals

Concurrent Optimization Techniques in C++: SIMD, Out‑of‑Order Execution, and Lock‑Free/Wait‑Free Algorithms

The article reviews Baidu C++ engineers' concurrency optimizations, explaining why modern software must exploit parallelism and detailing SIMD vectorization, out‑of‑order execution, and micro‑architectural analysis, then compares mutex, lock‑free, and wait‑free synchronization, showcasing case studies where atomic and wait‑free designs dramatically improve multithreaded performance.

SIMDconcurrencylock‑free
0 likes · 35 min read
Concurrent Optimization Techniques in C++: SIMD, Out‑of‑Order Execution, and Lock‑Free/Wait‑Free Algorithms
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Jun 16, 2021 · Operations

Designing System Capacity: From Event Scenarios to Precise QPS Planning

This article explains how to assess and design system capacity by analyzing real‑world scenarios—such as a company sports event—calculating required concurrency, average and peak QPS using the 80/20 rule, performing load tests, and determining instance counts to ensure reliable performance under varying traffic spikes.

Load TestingQPSSystem Design
0 likes · 12 min read
Designing System Capacity: From Event Scenarios to Precise QPS Planning
macrozheng
macrozheng
Jun 15, 2021 · Backend Development

Mastering Redisson: Seamless Distributed Locks in Spring Boot

This tutorial explains what Redisson is, how it extends Redis with powerful distributed data structures and lock mechanisms, and provides step‑by‑step Spring Boot integration, code examples, and detailed testing of re‑entrant, read‑write, and semaphore locks.

Spring Bootconcurrencydistributed-lock
0 likes · 15 min read
Mastering Redisson: Seamless Distributed Locks in Spring Boot
MaGe Linux Operations
MaGe Linux Operations
Jun 14, 2021 · Backend Development

How to Process a 16 GB Log File in Seconds with Go

Learn how to efficiently extract timestamped logs from a massive 16 GB file in seconds using Go's buffered I/O, sync.Pool, and goroutine concurrency, with step‑by‑step code examples, performance tips, and a complete runnable program.

Log Processingconcurrencylarge files
0 likes · 10 min read
How to Process a 16 GB Log File in Seconds with Go
Top Architect
Top Architect
Jun 12, 2021 · Fundamentals

Understanding Java Threads, Thread Pools, and Concurrency Mechanisms

This article provides a comprehensive guide to Java multithreading, covering thread concepts, lifecycle states, synchronization methods, thread creation techniques, ThreadPoolExecutor parameters, blocking queues, rejection policies, and inter‑thread communication mechanisms, including examples and best practices for efficient concurrent programming.

SynchronizationThreadPoolExecutorconcurrency
0 likes · 19 min read
Understanding Java Threads, Thread Pools, and Concurrency Mechanisms
Top Architect
Top Architect
Jun 3, 2021 · Backend Development

Understanding Java ThreadPoolExecutor: Creation, Parameters, and Execution Flow

This article explains why multithreading and thread pools are essential for modern server-side Java development, details the full set of ThreadPoolExecutor constructor parameters, and walks through the executor, addWorker, Worker, runWorker, and getTask implementations using JDK 1.8 source code examples.

ExecutorServiceThreadPoolExecutorbackend-development
0 likes · 7 min read
Understanding Java ThreadPoolExecutor: Creation, Parameters, and Execution Flow
Sohu Tech Products
Sohu Tech Products
Jun 2, 2021 · Fundamentals

Low‑Level Atomic Operations (SE‑0282) – Swift Atomics Overview

This article presents a comprehensive translation of the Swift Evolution proposal SE‑0282, detailing the design and implementation of low‑level atomic operations, memory orderings, and related types such as UnsafeAtomic and UnsafeAtomicLazyReference, providing examples and discussing integration with Swift’s concurrency model.

Swiftatomic operationsconcurrency
0 likes · 57 min read
Low‑Level Atomic Operations (SE‑0282) – Swift Atomics Overview
NetEase Smart Enterprise Tech+
NetEase Smart Enterprise Tech+
Jun 2, 2021 · Backend Development

How to Build a User‑Customizable Scheduled Task System with Java’s ScheduledExecutor

This article explains how to design and implement a user‑customizable scheduled‑task component in Java, addressing the limitations of open‑source frameworks by separating task creation, loading, scheduling, and execution, and provides practical code examples for robust backend task management.

ScheduledExecutorconcurrencyjava
0 likes · 11 min read
How to Build a User‑Customizable Scheduled Task System with Java’s ScheduledExecutor
Java Backend Technology
Java Backend Technology
May 29, 2021 · Backend Development

Avoid Hidden ThreadLocal Pitfalls: Memory Leaks, Context Loss in Thread Pools & Parallel Streams

This article explains three common ThreadLocal misuse traps—memory leaks caused by weak‑referenced keys, loss of thread‑local context in thread‑pool workers, and context disappearance in parallel streams—provides detailed code examples, and offers practical guidelines to prevent them in Java backend applications.

Parallel StreamThreadLocalconcurrency
0 likes · 9 min read
Avoid Hidden ThreadLocal Pitfalls: Memory Leaks, Context Loss in Thread Pools & Parallel Streams
TiPaiPai Technical Team
TiPaiPai Technical Team
May 28, 2021 · Backend Development

Mastering Go’s Context: Cancellation, Timeouts, and Value Propagation

This article explains Go’s context package, covering its purpose for managing goroutine lifecycles, the key interfaces and implementations such as emptyCtx, cancelCtx, timerCtx, and valueCtx, and demonstrates how to use WithCancel, WithDeadline, WithTimeout, and WithValue to control execution, propagate cancellations, and pass values across call chains.

GoTimeoutcancellation
0 likes · 12 min read
Mastering Go’s Context: Cancellation, Timeouts, and Value Propagation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 28, 2021 · Backend Development

Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities

This article provides a comprehensive explanation of Java's JUC origins, the design and implementation of AbstractQueuedSynchronizer (AQS), its template methods for exclusive and shared locks, the CLH queue mechanism, lock implementations, condition queues, and related code examples, illustrating how high‑performance concurrency primitives such as ReentrantLock, CountDownLatch, Semaphore, and ReentrantReadWriteLock work under the hood.

AQSConditionconcurrency
0 likes · 26 min read
Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
Sohu Tech Products
Sohu Tech Products
May 26, 2021 · Fundamentals

Understanding Apache Commons Pool2: Core Interfaces, Object States, Configuration Options, and Practical Usage

This article explains the concept of object pools, introduces Apache Commons Pool2 core interfaces and object states, details configuration parameters, describes the borrowing and returning workflow, and provides a complete Java example of a simple string pool implementation.

Apache Commons Pool2Resource Managementconcurrency
0 likes · 19 min read
Understanding Apache Commons Pool2: Core Interfaces, Object States, Configuration Options, and Practical Usage
Top Architect
Top Architect
May 24, 2021 · Backend Development

Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java

This article explains Java’s concurrency utilities CountDownLatch, CyclicBarrier, Semaphore, and Exchanger, illustrating their concepts with race‑style analogies, providing complete code examples, and showing execution results to demonstrate how threads can synchronize, wait, limit, and exchange data.

CountDownLatchCyclicBarrierExchanger
0 likes · 12 min read
Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java
Wukong Talks Architecture
Wukong Talks Architecture
May 21, 2021 · Backend Development

Using Redisson for Distributed Locks in Spring Boot

This article explains how to integrate Redisson into a Spring Boot application to implement various Redis‑based distributed synchronization primitives—including re‑entrant locks, read‑write locks, and semaphores—while covering configuration, code examples, the watchdog mechanism, and practical testing procedures.

Spring Bootconcurrencyjava
0 likes · 12 min read
Using Redisson for Distributed Locks in Spring Boot
macrozheng
macrozheng
May 21, 2021 · Fundamentals

Why Java’s Memory Model Matters: Unveiling the Hidden Rules of Concurrency

This article explains the hardware memory hierarchy, cache‑coherency issues, processor optimizations and instruction reordering, and shows how the Java Memory Model (JMM) defines eight operations to guarantee visibility, atomicity and ordering for multithreaded Java programs.

Cache CoherencyJMMMemory Model
0 likes · 12 min read
Why Java’s Memory Model Matters: Unveiling the Hidden Rules of Concurrency
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 19, 2021 · Backend Development

Understanding ThreadLocal in Java: Concepts, Memory‑Leak Risks, Source‑Code Walkthrough, and Best Practices

This article explains what ThreadLocal is, demonstrates how it works with and without it, analyses its source code, discusses potential memory‑leak issues, and provides best‑practice guidelines and a Spring‑Boot example for safe usage in multithreaded Java applications.

Spring BootThreadLocalbest practices
0 likes · 12 min read
Understanding ThreadLocal in Java: Concepts, Memory‑Leak Risks, Source‑Code Walkthrough, and Best Practices
Java Interview Crash Guide
Java Interview Crash Guide
May 19, 2021 · Backend Development

How to Optimize Java Scheduled Tasks for High‑Volume Data Sync

This article explains how to optimize Java scheduled tasks for large‑scale data synchronization by introducing phased improvements such as blacklist mechanisms, multithreaded execution with CountDownLatch, and server‑level sharding, providing practical guidelines for performance and reliability.

Scheduled Tasksconcurrencyjava
0 likes · 13 min read
How to Optimize Java Scheduled Tasks for High‑Volume Data Sync
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 18, 2021 · Backend Development

Understanding Thread Safety Issues with SimpleDateFormat and Solutions in Java

This article explains why SimpleDateFormat is not thread‑safe in Java, demonstrates the problem with multithreaded examples, and presents five practical solutions—including local variables, synchronized blocks, explicit locks, ThreadLocal, and the modern DateTimeFormatter—along with their advantages and drawbacks.

DateTimeFormatterSimpleDateFormatconcurrency
0 likes · 13 min read
Understanding Thread Safety Issues with SimpleDateFormat and Solutions in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 15, 2021 · Backend Development

Using ThreadLocal in Java: Scenarios, Thread‑Safety Problems, and Practical Solutions

This article explains why ThreadLocal is both simple and tricky to use, demonstrates common pitfalls when formatting dates with SimpleDateFormat in multithreaded environments, analyzes thread‑safety issues, and provides practical solutions using synchronized blocks, ThreadLocal, and its advanced initialization methods for clean and efficient concurrent code.

ThreadLocalconcurrencyjava
0 likes · 20 min read
Using ThreadLocal in Java: Scenarios, Thread‑Safety Problems, and Practical Solutions
Code Ape Tech Column
Code Ape Tech Column
May 14, 2021 · Backend Development

Optimizing ActiveMQ Message Queue Backlog: Removing Synchronization Locks and Tuning queuePrefetch

This article analyzes the causes of data backlog in an ActiveMQ message queue, demonstrates how synchronized locks and default prefetch settings limit throughput, and presents three optimization phases—including removing the lock, adjusting queuePrefetch, and redesigning queue handling—to achieve over 30‑fold performance improvement.

ActiveMQBackendMessage Queue
0 likes · 8 min read
Optimizing ActiveMQ Message Queue Backlog: Removing Synchronization Locks and Tuning queuePrefetch
TAL Education Technology
TAL Education Technology
May 13, 2021 · Backend Development

Understanding Java Concurrency: Volatile, Synchronized, JMM, and MESI

This article provides a comprehensive tutorial on Java concurrency, covering the usage and implementation principles of the volatile and synchronized keywords, the Java Memory Model, the MESI cache protocol, common visibility and reordering issues, and practical code examples for designing efficient multithreaded solutions.

JMMMESIconcurrency
0 likes · 17 min read
Understanding Java Concurrency: Volatile, Synchronized, JMM, and MESI
Tencent Music Tech Team
Tencent Music Tech Team
May 13, 2021 · Backend Development

Performance Optimization and Profiling of Go Services Using pprof and trace

The article outlines why high‑load Go services need performance tuning and presents a systematic workflow—preparation, analysis with Linux tools and Go’s pprof/trace, targeted optimizations such as goroutine pooling, Redis MSET, efficient JSON handling and slice resizing—demonstrating how these changes boost throughput, lower latency, and stabilize memory usage while offering broader Go‑specific best‑practice recommendations.

GoLinuxProfiling
0 likes · 25 min read
Performance Optimization and Profiling of Go Services Using pprof and trace
Top Architect
Top Architect
May 11, 2021 · Fundamentals

Understanding Java Locks: From Synchronized to Lock Upgrade Mechanisms

This article explains how Java implements locks—from the basic use of the synchronized keyword and Lock interface to the internal object header structures, bias, lightweight, and heavyweight lock upgrades, and the role of CAS and monitor objects in JVM concurrency control.

JVMLocksconcurrency
0 likes · 18 min read
Understanding Java Locks: From Synchronized to Lock Upgrade Mechanisms
Amap Tech
Amap Tech
May 11, 2021 · Backend Development

Design and Implementation of a Scalable Order State Machine for Complex Multi‑Dimensional Order Processing

The article presents a scalable, two‑dimensional order state machine architecture that separates vertical business isolation via annotated StateProcessor classes from horizontal logic reuse through modular checkers and plugins, employing distributed locks, optimistic DB locking, and a registry to ensure extensible, consistent multi‑dimensional order processing.

Design Patternsconcurrencymessage consistency
0 likes · 30 min read
Design and Implementation of a Scalable Order State Machine for Complex Multi‑Dimensional Order Processing
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 10, 2021 · Fundamentals

Understanding Java Semaphore: Usage Scenarios, Code Example, and Source‑Code Deep Dive

This article introduces Java's Semaphore as a thread‑synchronization tool, explains its flow‑control use cases such as database connections and parking lots, provides a complete parking‑lot simulation code sample, and analyzes the underlying AQS‑based implementation including fairness, acquire/release mechanics, and auxiliary methods.

AQSFairnessconcurrency
0 likes · 13 min read
Understanding Java Semaphore: Usage Scenarios, Code Example, and Source‑Code Deep Dive
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 7, 2021 · Backend Development

12 Essential Java Thread‑Pool Interview Questions and Answers

This article systematically explains why thread pools are needed, how to create them, the types of pools Executors can build, key parameters, underlying principles, rejection policies, blocking queues, core‑thread settings, pool states, thread reuse, the difference between submit() and execute(), and practical usage tips for Java developers.

BackendExecutorServiceThreadPool
0 likes · 13 min read
12 Essential Java Thread‑Pool Interview Questions and Answers
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 6, 2021 · Backend Development

Understanding User Threads and Daemon Threads in Java

This article explains the differences between user threads and daemon (background) threads in Java, demonstrates how to identify, create, and configure them—including thread pools—and discusses important considerations, priority effects, and typical use cases such as garbage collection.

Daemon ThreadThread PriorityThreadPool
0 likes · 13 min read
Understanding User Threads and Daemon Threads in Java
Youzan Coder
Youzan Coder
Apr 30, 2021 · Backend Development

Uncovering Hidden Flaws in a Distributed Lock Implementation: A Structured Code Review

This article examines the business context and collection workflow of a BOS‑integrated service, dissects the distributed lock logic and its execution sequence, and conducts a thorough structured code review that reveals logical, exception, non‑functional, and testability issues while offering concrete improvement recommendations.

BackendCode reviewbest practices
0 likes · 8 min read
Uncovering Hidden Flaws in a Distributed Lock Implementation: A Structured Code Review
Top Architect
Top Architect
Apr 30, 2021 · Backend Development

Redis Distributed Lock Failure Causing Overselling and Safer Lock Solutions

This article analyzes a real‑world flash‑sale incident where a Redis distributed lock expired under high concurrency, leading to massive overselling, and presents safer lock implementations, atomic stock checks, and architectural improvements to prevent similar failures.

concurrencyjavaoverselling
0 likes · 11 min read
Redis Distributed Lock Failure Causing Overselling and Safer Lock Solutions
Wukong Talks Architecture
Wukong Talks Architecture
Apr 29, 2021 · Backend Development

Distributed Lock Implementations with Redis: From Local Locks to Bronze, Silver, Gold, Platinum, and Diamond Solutions

This article explains why local in‑memory locks fail in distributed environments, introduces the concept of distributed locks, and walks through five progressive Redis‑based lock implementations—bronze, silver, gold, platinum, and diamond—detailing their principles, code examples, advantages, and shortcomings.

Backendconcurrencyjava
0 likes · 16 min read
Distributed Lock Implementations with Redis: From Local Locks to Bronze, Silver, Gold, Platinum, and Diamond Solutions
Top Architect
Top Architect
Apr 27, 2021 · Backend Development

Common Misunderstandings in Thread Pool Configuration and How to Avoid Them

This article explains the inner workings of Java thread pools, clarifies common misconceptions about core pool sizing, BlockingQueue behavior, concurrency calculation, and runtime factors such as GC, providing practical guidance and code examples for correctly configuring thread pools in backend systems.

BlockingQueueJVMThreadPool
0 likes · 12 min read
Common Misunderstandings in Thread Pool Configuration and How to Avoid Them
JD Retail Technology
JD Retail Technology
Apr 27, 2021 · Mobile Development

Understanding Kotlin Coroutines: Concepts, Usage, and Comparison with RxJava

This article explains Kotlin coroutine fundamentals, creation, launch and async usage, suspension functions, withContext, and compares coroutine-based implementations with RxJava in Android development, providing code examples and best‑practice guidance, including performance considerations and migration advice.

AndroidAsyncCoroutines
0 likes · 18 min read
Understanding Kotlin Coroutines: Concepts, Usage, and Comparison with RxJava
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 27, 2021 · Backend Development

Essential Java Concurrency Interview Topics – 12 Core Questions and Answers

This article presents twelve fundamental Java concurrency interview questions, covering thread creation methods, their pros and cons, thread states, lifecycle, start vs run, termination, thread safety, differences between threads and processes, communication, yield vs sleep, and provides concise answers to help candidates demonstrate solid multithreading knowledge.

BackendThreadconcurrency
0 likes · 11 min read
Essential Java Concurrency Interview Topics – 12 Core Questions and Answers
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 25, 2021 · Backend Development

Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable

Through a whimsical first‑person narrative, the article explains three Java thread‑creation techniques—extending Thread, implementing Runnable (including anonymous and lambda forms), and using Callable with FutureTask—to illustrate their syntax, usage, and the ability to retrieve thread results.

CallableRunnableThread
0 likes · 7 min read
Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable
21CTO
21CTO
Apr 24, 2021 · Backend Development

Unlocking C++ Performance: Surprising Memory‑Access Tricks from Baidu Engineers

This article explores Baidu C++ engineers' deep‑dive into performance optimization, covering memory‑access patterns, string‑buffer handling, protobuf merging, malloc strategies, job‑arena allocation, cache‑line effects, and modern memory‑order semantics to achieve multi‑fold speedups in large‑scale backend services.

C++Protobufbackend-development
0 likes · 33 min read
Unlocking C++ Performance: Surprising Memory‑Access Tricks from Baidu Engineers
Liangxu Linux
Liangxu Linux
Apr 24, 2021 · Databases

Understanding MySQL Lock Types and How to Prevent Deadlocks

This article explains MySQL's table, row, and page lock levels, describes next‑key, gap, and record locks, illustrates common deadlock scenarios with detailed SQL examples, and outlines InnoDB's lock acquisition and deadlock‑prevention strategies to help developers avoid concurrency issues.

InnoDBLock Typesconcurrency
0 likes · 14 min read
Understanding MySQL Lock Types and How to Prevent Deadlocks
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 21, 2021 · Backend Development

Understanding Java Thread Pools: Core Concepts, Rejection Policies, and Sizing Guidelines

This article explains Java thread pool fundamentals—including core parameters, task submission behavior, rejection policies, queue selection, thread factory usage, keep-alive settings—and provides practical guidance on determining optimal thread counts for I/O‑bound and CPU‑bound workloads.

ThreadPoolbackend-developmentconcurrency
0 likes · 11 min read
Understanding Java Thread Pools: Core Concepts, Rejection Policies, and Sizing Guidelines
vivo Internet Technology
vivo Internet Technology
Apr 21, 2021 · Backend Development

Analysis of Apache Commons-Pool2 Object Pooling Implementation

The article examines Apache Commons‑Pool2’s object‑pool architecture, detailing its core interfaces (ObjectPool, PooledObjectFactory, PooledObject), the GenericObjectPool construction, FIFO/LIFO idle‑object deque management with lock‑based concurrency, borrowing and returning workflows, self‑protection features like abandonment detection, and the performance tuning needed for high‑concurrency environments.

Object PoolingResource Managementcommons-pool2
0 likes · 17 min read
Analysis of Apache Commons-Pool2 Object Pooling Implementation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 20, 2021 · Backend Development

Comprehensive Java HashMap Interview Questions and Answers

This article provides a thorough collection of over 30 common Java HashMap interview questions, explaining its underlying data structures, hashing mechanisms, collision resolution, resizing, thread safety, and differences from related maps, along with detailed answers and code examples for each topic.

CollectionsHashMapconcurrency
0 likes · 21 min read
Comprehensive Java HashMap Interview Questions and Answers
Architect's Tech Stack
Architect's Tech Stack
Apr 20, 2021 · Backend Development

Redis Distributed Lock Failure Analysis and Safer Lock Implementation for High‑Concurrency Seckill

This article examines a real‑world incident where a Redis‑based distributed lock caused a 100‑bottle oversell of a scarce product, analyzes the root causes such as lock expiration and non‑atomic stock checks, and presents safer lock and stock‑validation solutions using Lua scripts and atomic Redis operations.

concurrencydistributed-lockjava
0 likes · 11 min read
Redis Distributed Lock Failure Analysis and Safer Lock Implementation for High‑Concurrency Seckill
FunTester
FunTester
Apr 19, 2021 · Operations

How to Add a Soft‑Start Mechanism for High‑QPS Performance Testing in Java

This article explains the concept of soft‑start in performance testing, presents Java implementations for both fixed‑thread and fixed‑QPS models, discusses error‑impact considerations, and provides practical code snippets to gradually ramp up load and improve measurement accuracy for high‑throughput services.

Load TestingPerformance Testingconcurrency
0 likes · 8 min read
How to Add a Soft‑Start Mechanism for High‑QPS Performance Testing in Java
DataFunTalk
DataFunTalk
Apr 18, 2021 · Big Data

Comparing Apache Hudi, Apache Iceberg, and Delta Lake for Data Lake Storage

This article compares Apache Hudi, Apache Iceberg, and Delta Lake, examining their storage formats, platform compatibility, update performance, concurrency guarantees, and integration with lakeFS to help readers choose the most suitable solution for their data lake use case.

Apache HudiApache IcebergDelta Lake
0 likes · 16 min read
Comparing Apache Hudi, Apache Iceberg, and Delta Lake for Data Lake Storage
JD Tech
JD Tech
Apr 16, 2021 · Backend Development

Using java.util.Timer for Scheduled and Delayed Tasks in Java

This article explains how to use java.util.Timer for one‑time and periodic task scheduling, covering constructors, instance methods, daemon‑thread behavior, handling past dates, negative delays, multiple tasks, and proper shutdown, with complete code examples and execution results.

BackendSchedulingconcurrency
0 likes · 24 min read
Using java.util.Timer for Scheduled and Delayed Tasks in Java