Tagged articles

concurrency

2156 articles · Page 15 of 22
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.

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

concurrencyoperating systemparallelism
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.

AtomicityJavaMemory Model
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.

JavaRedisconcurrency
0 likes · 6 min read
Implementing Distributed Locks with Redis and Redisson in Java
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.

AtomicIntegerCyclicBarrierJava
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 ProcessingGoLarge Files
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.

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

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

JavaMath.randomRandom Number Generation
0 likes · 15 min read
Mastering Java Random Number Generation: Random, ThreadLocalRandom, SecureRandom & Math
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.

FrontendHTTP/2Network Protocols
0 likes · 15 min read
Do HTTP/2’s Multiplexing Still Need Image Sprites? Experimental Insights
Programmer DD
Programmer DD
Jun 17, 2021 · Backend Development

Why StringBuilder Fails in Multithreaded Code and How StringBuffer Solves It

This article explains why StringBuilder is not thread‑safe, demonstrates the problem with a multithreaded example that produces a wrong length and occasional ArrayIndexOutOfBoundsException, and shows how StringBuffer’s synchronized implementation avoids these issues.

JavaStringBufferStringBuilder
0 likes · 8 min read
Why StringBuilder Fails in Multithreaded Code and How StringBuffer Solves It
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.

Large FilesLog ProcessingPerformance
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.

Performance optimizationSIMDconcurrency
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.

QPScapacity planningconcurrency
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.

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

Large FilesLog ProcessingPerformance
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.

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

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

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

JavaParallel StreamThreadLocal
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.

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

AQSConditionJava
0 likes · 26 min read
Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
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.

JavaRedisSpring Boot
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 CoherencyJMMJava
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.

Best PracticesJavaSpring Boot
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.

JavaPerformance optimizationSharding
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.

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

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

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

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

GoLinuxPerformance optimization
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.

JavaLocksconcurrency
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 PatternsState Machineconcurrency
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.

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

BackendJavaconcurrency
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 ThreadJavaThread Priority
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.

BackendBest PracticesDistributed Lock
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.

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

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

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

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

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

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

Backend DevelopmentC++Performance optimization
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.

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

Backend DevelopmentJavaPerformance Tuning
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.

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

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

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

Javaconcurrencyhigh QPS
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.

BackendJavaScheduling
0 likes · 24 min read
Using java.util.Timer for Scheduled and Delayed Tasks in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 12, 2021 · Backend Development

Understanding Java CyclicBarrier: Usage, Implementation Details, and Comparison with CountDownLatch

This article explains the concept, practical usage, internal implementation, and key methods of Java's CyclicBarrier, compares it with CountDownLatch, and provides a complete code example demonstrating how multiple threads can repeatedly synchronize at a reusable barrier.

Backend DevelopmentCountDownLatchCyclicBarrier
0 likes · 8 min read
Understanding Java CyclicBarrier: Usage, Implementation Details, and Comparison with CountDownLatch
Ops Development Stories
Ops Development Stories
Apr 12, 2021 · Backend Development

Mastering Zookeeper Distributed Locks: From Seckill to Read‑Write Locks

This article explains how Zookeeper’s distributed lock mechanisms—including non‑fair, fair, and read‑write locks—can prevent overselling in high‑traffic seckill scenarios, details their advantages and drawbacks, and provides practical Curator‑based Java implementations with code examples.

CuratorDistributed LockJava
0 likes · 13 min read
Mastering Zookeeper Distributed Locks: From Seckill to Read‑Write Locks
Programmer DD
Programmer DD
Apr 11, 2021 · Backend Development

Understanding Server Thread Models: Blocking I/O, Reactor, and Proactor

This article explains how servers handle requests using process/thread models, covering traditional blocking I/O, the Reactor pattern with its single‑thread, multi‑thread, and master‑slave variants, and the Proactor model, while comparing their advantages, drawbacks, and typical use cases.

ProactorReactor PatternThread Model
0 likes · 12 min read
Understanding Server Thread Models: Blocking I/O, Reactor, and Proactor
Selected Java Interview Questions
Selected Java Interview Questions
Apr 9, 2021 · Backend Development

Understanding Java Thread Pools: Concepts, Creation, Execution Flow, and Common Types

This article explains Java thread pool fundamentals, including the purpose and advantages of using a pool, the parameters of ThreadPoolExecutor, the task execution workflow, saturation policies, and detailed descriptions of common pool types such as SingleThreadExecutor, FixedThreadPool, CachedThreadPool, and ScheduledThreadPool, plus a typical interview question about unbounded queues.

BackendJavaPerformance
0 likes · 9 min read
Understanding Java Thread Pools: Concepts, Creation, Execution Flow, and Common Types
Java Interview Crash Guide
Java Interview Crash Guide
Apr 9, 2021 · Backend Development

Mastering Java Thread Pools: Benefits, Creation, Tuning & Monitoring

This article explores Java's thread pool framework in depth, covering its advantages, internal workflow, creation parameters, task submission, lifecycle states, tuning strategies, monitoring metrics, and common pitfalls, providing code examples and practical guidance for effective concurrency management in backend applications.

JavaPerformance TuningThreadPoolExecutor
0 likes · 17 min read
Mastering Java Thread Pools: Benefits, Creation, Tuning & Monitoring
TAL Education Technology
TAL Education Technology
Apr 8, 2021 · Backend Development

Java Concurrency Programming: Concepts, Tools, and Practical Examples

This comprehensive guide introduces Java concurrency fundamentals, explains common tools and their underlying principles, discusses typical challenges such as thread safety, visibility, and ordering, and provides practical code examples and optimization techniques for building high‑performance multithreaded applications.

Javaconcurrencymultithreading
0 likes · 16 min read
Java Concurrency Programming: Concepts, Tools, and Practical Examples
Top Architect
Top Architect
Apr 7, 2021 · Backend Development

20 Practical Examples of Using Java CompletableFuture for Asynchronous Programming

This article introduces Java's CompletableFuture and CompletionStage APIs, explains their contracts, and provides twenty concise code examples that demonstrate creating completed futures, running async stages, applying functions synchronously and asynchronously, handling exceptions, combining futures, using custom executors, and orchestrating multiple stages with allOf/anyOf.

CompletableFutureCompletionStageJava
0 likes · 16 min read
20 Practical Examples of Using Java CompletableFuture for Asynchronous Programming
Intelligent Backend & Architecture
Intelligent Backend & Architecture
Apr 7, 2021 · Fundamentals

Unlocking Java Concurrency: Master Threads, Locks, and Thread Pools

This comprehensive guide explains why concurrency is essential for modern systems, introduces core metrics like response time and throughput, outlines the three pillars of thread safety, compares concurrency with parallelism, and provides practical solutions for deadlocks, thread creation, synchronization, and efficient thread‑pool usage in Java.

DeadlockJavaSynchronization
0 likes · 87 min read
Unlocking Java Concurrency: Master Threads, Locks, and Thread Pools
Top Architect
Top Architect
Apr 6, 2021 · Backend Development

Why ConcurrentHashMap.get() in Java 8 Is Lock‑Free

The article explains how Java 8's ConcurrentHashMap implements a lock‑free get() operation by replacing the Segment design with Node objects, using volatile fields and CAS, and how the volatile‑marked table array ensures visibility during resizing, making reads both safe and efficient.

Backend DevelopmentJavaconcurrency
0 likes · 10 min read
Why ConcurrentHashMap.get() in Java 8 Is Lock‑Free
Selected Java Interview Questions
Selected Java Interview Questions
Apr 5, 2021 · Backend Development

Understanding Thread Safety in Java: StringBuilder, StringBuffer, and Servlets

This article explains the thread‑safety differences between StringBuilder and StringBuffer, demonstrates the problems of using mutable shared objects in multithreaded Java code, presents three solutions, and discusses why Servlets are not thread‑safe by default, highlighting visibility and ordering concepts.

Backend DevelopmentJavaServlet
0 likes · 10 min read
Understanding Thread Safety in Java: StringBuilder, StringBuffer, and Servlets
Python Programming Learning Circle
Python Programming Learning Circle
Apr 2, 2021 · Fundamentals

Effective Python Parallelism with Thread Pools and the map() Function

This article critiques traditional Python threading tutorials and demonstrates how to replace verbose thread‑pool code with concise map‑based parallelism using multiprocessing and multiprocessing.dummy, providing practical examples, performance measurements, and guidelines for choosing pool sizes for I/O‑ and CPU‑bound tasks.

Multiprocessingconcurrencymap
0 likes · 11 min read
Effective Python Parallelism with Thread Pools and the map() Function