Tagged articles
632 articles
Page 2 of 7
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 13, 2025 · Frontend Development

A Practical Guide to Using Web Workers for Front‑End Performance Optimization

This article introduces Web Workers as an HTML5 API for running background threads, explains their creation and communication mechanisms, provides a complete Fibonacci calculation demo with full source code, and discusses common pitfalls such as asynchronous postMessage behavior, data serialization, and proper thread termination.

HTML5JavaScriptWeb Workers
0 likes · 9 min read
A Practical Guide to Using Web Workers for Front‑End Performance Optimization
Architect's Guide
Architect's Guide
Feb 6, 2025 · Backend Development

Optimizing Large IN Queries with Spring AOP and Multi‑Threaded Splitting

This article explains how to improve performance of massive IN‑list database queries in Java by defining custom Spring AOP annotations that automatically split the parameter list, execute the sub‑queries concurrently in a thread pool, and merge the results using a configurable return‑handling strategy.

Javaaopin-query
0 likes · 10 min read
Optimizing Large IN Queries with Spring AOP and Multi‑Threaded Splitting
Architecture & Thinking
Architecture & Thinking
Jan 28, 2025 · Fundamentals

Understanding Java Deadlocks: Causes, Examples, and Prevention Strategies

This article explains the concept of deadlocks in concurrent programming, outlines the four necessary conditions, examines common causes in Java, provides a runnable code example, and presents practical prevention, avoidance, detection, and recovery techniques to keep multithreaded applications running smoothly.

Resource ManagementSynchronizationconcurrency
0 likes · 7 min read
Understanding Java Deadlocks: Causes, Examples, and Prevention Strategies
FunTester
FunTester
Jan 23, 2025 · Backend Development

Chapter 3: Developing a Performance Testing Engine

This chapter explains how to build a Java-based performance testing engine by dissecting common testing requirements, illustrating queue and throttling models through a supermarket analogy, and presenting thread‑based and TPS‑based designs with code examples and future extensions.

Backend DevelopmentJavaPerformance Testing
0 likes · 13 min read
Chapter 3: Developing a Performance Testing Engine
FunTester
FunTester
Jan 20, 2025 · Fundamentals

Mastering ThreadLocal in Java: From Basics to Best Practices

ThreadLocal provides a simple yet powerful way to give each thread its own independent variable, eliminating shared-state conflicts; this guide explains its underlying mechanism, creation methods, basic get/set operations, a complete example with console output, and important usage considerations such as potential memory leaks.

JavaPerformance TestingThreadLocal
0 likes · 6 min read
Mastering ThreadLocal in Java: From Basics to Best Practices
Top Architect
Top Architect
Jan 16, 2025 · Backend Development

Optimizing XML‑to‑MySQL Data Import: Reducing Execution Time from 300 s to 4 s

This article describes how to dramatically speed up the import of 60,000+ XML records into MySQL by analyzing the original environment, measuring baseline performance, and applying a series of backend optimizations—including MySQL batch mode, rewriteBatchedStatements, multithreaded asynchronous writes with Disruptor, and XML parsing improvements—ultimately cutting the total runtime from five minutes to just a few seconds.

Batch ProcessingDisruptorJava
0 likes · 14 min read
Optimizing XML‑to‑MySQL Data Import: Reducing Execution Time from 300 s to 4 s
Deepin Linux
Deepin Linux
Jan 16, 2025 · Fundamentals

TCMalloc: Architecture, Principles, Usage, and Performance Comparison

This article provides a comprehensive overview of Google’s TCMalloc memory allocator, detailing its three‑level cache architecture, allocation and reclamation strategies, installation methods, configuration options, and performance advantages over other allocators in C++ backend, game, and database applications.

C performanceMemory AllocatorTCMalloc
0 likes · 27 min read
TCMalloc: Architecture, Principles, Usage, and Performance Comparison
macrozheng
macrozheng
Jan 15, 2025 · Backend Development

Boost PostgreSQL IN Query Performance with Spring AOP Parallel Splitting

This article explains how to improve PostgreSQL IN‑query performance in Spring Boot applications by splitting large IN parameter lists into smaller batches, executing them concurrently with a custom AOP annotation, and merging the results, providing a reusable annotation‑driven solution for high‑throughput backend services.

Javain-querymultithreading
0 likes · 10 min read
Boost PostgreSQL IN Query Performance with Spring AOP Parallel Splitting
Top Architecture Tech Stack
Top Architecture Tech Stack
Jan 13, 2025 · Databases

Using Multithreading in Redis: I/O Threads, Background Tasks, and Memory Allocator

The article explains how Redis, a high‑performance key‑value store, can leverage multithreading for I/O operations, background tasks like UNLINK, and jemalloc memory‑management threads, providing configuration examples and Python code to improve performance in high‑concurrency scenarios while noting the associated CPU cost.

I/O ThreadsMemory ManagementPython
0 likes · 6 min read
Using Multithreading in Redis: I/O Threads, Background Tasks, and Memory Allocator
Architect
Architect
Jan 12, 2025 · Databases

How I Cut XML‑to‑MySQL Import Time from 300 s to 4 s

This article walks through a real‑world case of importing over 60,000 XML rows into MySQL, profiling the initial 300‑second runtime, and applying a series of optimizations—including JDBC batch processing, rewriteBatchedStatements, multithreaded asynchronous writes with Disruptor, and MySQL tuning—to achieve a final import time of around 4 seconds while managing memory usage.

Batch ProcessingDisruptorJava
0 likes · 13 min read
How I Cut XML‑to‑MySQL Import Time from 300 s to 4 s
FunTester
FunTester
Jan 9, 2025 · Backend Development

Understanding and Using CountDownLatch in Java Concurrency

This article explains the purpose, basic methods, best‑practice usage, and typical scenarios of Java's CountDownLatch utility, providing code examples and a comparison with Thread.sleep to help developers synchronize multiple threads effectively.

Backend DevelopmentCountDownLatchJava
0 likes · 9 min read
Understanding and Using CountDownLatch in Java Concurrency
Architecture Digest
Architecture Digest
Jan 6, 2025 · Backend Development

Optimizing Large IN Queries with Spring AOP and Multithreaded Splitting

This article explains how to improve performance of massive IN‑list queries in PostgreSQL by splitting the parameter list, executing the sub‑queries concurrently with a custom Spring AOP annotation, and merging the results using a configurable thread pool and return‑handling strategy.

JavaPostgreSQLaop
0 likes · 9 min read
Optimizing Large IN Queries with Spring AOP and Multithreaded Splitting
FunTester
FunTester
Jan 3, 2025 · Backend Development

Java Atomic Package Classes: AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder

This article introduces Java's java.util.concurrent.atomic package, detailing the core atomic classes—AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder—including their constructors, key methods, typical use cases, and performance considerations in high‑concurrency scenarios for developers seeking efficient thread‑safe operations.

Javalongaddermultithreading
0 likes · 9 min read
Java Atomic Package Classes: AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder
FunTester
FunTester
Dec 31, 2024 · Backend Development

Mastering Java ReentrantLock: Blocking, Interruptible, and Timeout Locks Explained

This article explains the Java java.util.concurrent.locks.Lock interface and its ReentrantLock implementation, detailing the advantages of reentrancy, interruptibility, and timeout features, and provides practical code examples for blocking, interruptible, and timed lock acquisition along with best‑practice recommendations.

LockReentrantLockconcurrency
0 likes · 12 min read
Mastering Java ReentrantLock: Blocking, Interruptible, and Timeout Locks Explained
Alibaba Cloud Developer
Alibaba Cloud Developer
Dec 23, 2024 · Backend Development

Unlocking High‑Performance C++ Concurrency: Memory Model, Atomics, and Lock‑Free Techniques

This article explains C++11’s memory model and atomic types, demonstrating how lock‑free concurrency, memory ordering, and synchronization primitives such as fences can be used to achieve high‑performance, race‑free multithreaded code for demanding backend systems like game servers.

C++Lock-Free ProgrammingMemory Model
0 likes · 26 min read
Unlocking High‑Performance C++ Concurrency: Memory Model, Atomics, and Lock‑Free Techniques
Architect
Architect
Dec 20, 2024 · Backend Development

Boost MyBatis-Plus Batch Inserts by 2000% with rewriteBatchedStatements and ID Pre‑Generation

By configuring MySQL’s rewriteBatchedStatements=true, pre‑generating primary keys, adjusting MyBatis executor settings, and employing asynchronous multithreaded batch inserts, this guide demonstrates how to accelerate MyBatis‑Plus saveBatch operations from seconds to milliseconds, achieving up to a 2000% performance gain in large‑scale data scenarios.

Batch InsertJavaPerformance Optimization
0 likes · 20 min read
Boost MyBatis-Plus Batch Inserts by 2000% with rewriteBatchedStatements and ID Pre‑Generation
Python Crawling & Data Mining
Python Crawling & Data Mining
Dec 19, 2024 · Backend Development

How to Scrape and Automate King of Glory Item Data with Python

Learn how to use Python to scrape hero equipment data from the King of Glory website, download images via multithreaded requests, and automatically generate comprehensive Markdown and Excel reports, complete with code snippets and troubleshooting tips for a seamless data extraction workflow.

data-processinggame datamarkdown
0 likes · 9 min read
How to Scrape and Automate King of Glory Item Data with Python
Open Source Tech Hub
Open Source Tech Hub
Dec 18, 2024 · Backend Development

What’s New in Swoole v6.0.0? Multithreading, iouring, and Core Optimizations Explained

Swoole v6.0.0 introduces multithreaded mode, new thread classes and synchronization primitives, iouring‑based asynchronous file I/O, numerous bug fixes, kernel optimizations, and deprecations, providing developers with enhanced performance, richer APIs, and broader platform compatibility for high‑concurrency PHP applications.

AsynchronousPHPSwoole
0 likes · 12 min read
What’s New in Swoole v6.0.0? Multithreading, iouring, and Core Optimizations Explained
FunTester
FunTester
Nov 28, 2024 · Backend Development

Java Multithreading Implementations

This article explains three common ways to create multithreaded Java programs—extending Thread, implementing Runnable, and using Lambda expressions—providing step‑by‑step instructions, code samples, console output, and a summary of each method’s advantages and appropriate use cases.

JavaLambdaRunnable
0 likes · 6 min read
Java Multithreading Implementations
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 26, 2024 · Backend Development

Understanding CountDownLatch and CompletableFuture in Java Concurrency

This article explains the purpose, typical usage scenarios, and provides concrete code demonstrations of Java's CountDownLatch and CompletableFuture, comparing their synchronization versus asynchronous capabilities and guiding developers on selecting the appropriate tool for effective multithreaded programming.

CompletableFutureCountDownLatchJava
0 likes · 6 min read
Understanding CountDownLatch and CompletableFuture in Java Concurrency
FunTester
FunTester
Nov 25, 2024 · Fundamentals

Understanding Concurrency and Parallelism in Java Multithreading

This article introduces the basics of Java multithreading concurrency, explains the difference between concurrency and parallelism with a supermarket analogy, and details thread pool creation, usage, and customization through analysis of ThreadPoolExecutor source code.

JavaParallelismThreadPoolExecutor
0 likes · 9 min read
Understanding Concurrency and Parallelism in Java Multithreading
Liangxu Linux
Liangxu Linux
Nov 21, 2024 · Fundamentals

When to Use Spin Locks and How They Work in Multithreaded Code

This article explains the concept of spin locks, compares them with mutexes, shows how to use the pthread API and C++ atomic_flag to implement them, outlines suitable scenarios, highlights CPU‑usage pitfalls, and provides practical code examples.

C++LinuxSynchronization
0 likes · 10 min read
When to Use Spin Locks and How They Work in Multithreaded Code
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 15, 2024 · Backend Development

Spring Boot 3.2.5 New Features: Multithreaded Bean Init, @Fallback, RestClient & More

This article walks through Spring Boot 3.2.5 enhancements including multithreaded bean initialization, the new @Fallback annotation, handling duplicate bean names, RestClient.create(URI) usage, header binding to records, expanded task‑scheduler metadata, and a host of other backend improvements.

Backend DevelopmentRestClientSpring Boot
0 likes · 9 min read
Spring Boot 3.2.5 New Features: Multithreaded Bean Init, @Fallback, RestClient & More
Top Architect
Top Architect
Nov 2, 2024 · Backend Development

Optimizing MyBatis-Plus Batch Insert Performance with rewriteBatchedStatements and Multithreading

This article explains how to dramatically speed up MyBatis-Plus batch inserts by enabling the rewriteBatchedStatements JDBC property, creating custom batch insert/update methods, and applying multithreading, providing code examples, performance test results, and practical recommendations for handling large data synchronizations.

Batch InsertJavaPerformance Optimization
0 likes · 15 min read
Optimizing MyBatis-Plus Batch Insert Performance with rewriteBatchedStatements and Multithreading
Deepin Linux
Deepin Linux
Oct 30, 2024 · Fundamentals

An Introduction to POSIX Threads (Pthread) and Their Practical Usage in C/C++

This article provides a comprehensive overview of POSIX threads, covering their architecture, creation, synchronization, attributes, scheduling policies, advantages, drawbacks, and real‑world examples such as mutex protection, barrier synchronization, and a cross‑platform network server implementation.

C programmingLinuxPOSIX
0 likes · 21 min read
An Introduction to POSIX Threads (Pthread) and Their Practical Usage in C/C++
Java Architect Essentials
Java Architect Essentials
Oct 29, 2024 · Backend Development

Optimizing Batch Insert Performance with MyBatis-Plus: Configuration, Custom Methods, and Multithreading

This article explains why MyBatis-Plus's saveBatch() can be slow for large data sets, shows how enabling rewriteBatchedStatements in the JDBC URL dramatically speeds up inserts, and demonstrates custom batch insert/update methods and multithreaded execution to further improve performance, complete with code examples and test results.

Batch InsertJavaPerformance Optimization
0 likes · 14 min read
Optimizing Batch Insert Performance with MyBatis-Plus: Configuration, Custom Methods, and Multithreading
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 28, 2024 · Backend Development

Resolving Missing Request Headers in Spring MVC Multithreaded Environments

This article analyzes why Spring MVC fails to retrieve request header fields in multithreaded scenarios, explains the underlying ThreadLocal storage mechanism, critiques a common but flawed solution, and presents reliable approaches using CountDownLatch, manual RequestContextHolder propagation, and request caching to ensure header availability across threads.

BackendJavaRequestContextHolder
0 likes · 10 min read
Resolving Missing Request Headers in Spring MVC Multithreaded Environments
Test Development Learning Exchange
Test Development Learning Exchange
Oct 23, 2024 · Fundamentals

Understanding Race Conditions, Deadlocks, Resource Contention, and Data Consistency in Multithreaded Python

This article explains common multithreading problems such as race conditions, deadlocks, resource contention, and data consistency issues, and provides Python code examples that demonstrate synchronization techniques, lock ordering, connection pooling, thread pools, and transaction management to ensure correct and stable concurrent execution.

Data ConsistencyPythonResource Management
0 likes · 10 min read
Understanding Race Conditions, Deadlocks, Resource Contention, and Data Consistency in Multithreaded Python
21CTO
21CTO
Oct 19, 2024 · Fundamentals

Why Does Python Still Use the GIL? Understanding Its Role and Alternatives

Python's Global Interpreter Lock (GIL) serializes thread execution to protect memory, but in today's multicore era it creates performance bottlenecks; this article explains what the GIL is, why it exists, its impact on multithreading, and how multiprocessing can bypass its limitations.

GILPythonmultiprocessing
0 likes · 6 min read
Why Does Python Still Use the GIL? Understanding Its Role and Alternatives
Deepin Linux
Deepin Linux
Oct 16, 2024 · Fundamentals

Comprehensive Guide to Using GDB for Debugging C/C++ Programs

This article provides a thorough introduction to the GNU Debugger (GDB), covering its core capabilities, startup methods, compilation requirements, a wide range of debugging techniques—including breakpoints, memory inspection, disassembly, reverse execution—and detailed guidance for multithreaded debugging on Linux systems.

C programmingLinuxcommand-line
0 likes · 20 min read
Comprehensive Guide to Using GDB for Debugging C/C++ Programs
Python Programming Learning Circle
Python Programming Learning Circle
Oct 10, 2024 · Backend Development

Python Web Scraping Techniques: Requests, Proxies, Cookies, Headers, Captcha, Gzip, and Multithreading

This article outlines essential Python web‑scraping techniques, covering basic GET/POST requests, proxy usage, cookie handling, header manipulation to mimic browsers, simple captcha solutions, gzip compression handling, and multithreaded crawling with a thread‑pool template, providing practical code examples for each step.

GzipProxyPython
0 likes · 5 min read
Python Web Scraping Techniques: Requests, Proxies, Cookies, Headers, Captcha, Gzip, and Multithreading
Sanyou's Java Diary
Sanyou's Java Diary
Sep 26, 2024 · Fundamentals

Mastering Java volatile: Visibility, Atomicity, and Memory Model Explained

This article provides a comprehensive guide to Java's volatile keyword, covering its pronunciation, core features such as visibility, lack of atomicity, and instruction reordering prevention, the Java Memory Model, cache‑coherence mechanisms, practical code examples, and best‑practice scenarios like double‑checked locking and when to prefer volatile over heavier synchronization constructs.

JMMMemory Modelmultithreading
0 likes · 21 min read
Mastering Java volatile: Visibility, Atomicity, and Memory Model Explained
Deepin Linux
Deepin Linux
Sep 26, 2024 · Fundamentals

Understanding CPU Cache Hierarchy, Write‑Back Strategy, and Memory Ordering in Multithreaded Programming

This article explains the structure and operation of modern CPU multi‑level caches, the write‑back caching policy, cache‑coherence mechanisms, atomic operations, and various memory‑ordering models in C++ multithreaded programs, providing detailed concepts, hardware and software solutions, and practical code examples.

C++atomic operationsmemory ordering
0 likes · 32 min read
Understanding CPU Cache Hierarchy, Write‑Back Strategy, and Memory Ordering in Multithreaded Programming
Selected Java Interview Questions
Selected Java Interview Questions
Aug 18, 2024 · Backend Development

Redis Introduces a Multi‑Threaded Query Engine to Boost Vector Search Performance for Generative AI

Redis has launched a multi‑threaded query engine that vertically scales its in‑memory database, dramatically increasing query throughput and lowering latency for vector similarity searches, thereby addressing the performance demands of real‑time retrieval‑augmented generation in generative AI applications.

BackendRAGgenerative AI
0 likes · 9 min read
Redis Introduces a Multi‑Threaded Query Engine to Boost Vector Search Performance for Generative AI
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 15, 2024 · Backend Development

Understanding Java ConcurrentHashMap: Principles, Implementation, and Usage

This article provides a comprehensive overview of Java's ConcurrentHashMap, explaining its purpose, underlying lock‑segmentation and CAS mechanisms in JDK 7 and JDK 8, demonstrating usage with sample code, and outlining scenarios where it delivers high‑performance thread‑safe map operations.

Backend DevelopmentConcurrentHashMapData Structures
0 likes · 6 min read
Understanding Java ConcurrentHashMap: Principles, Implementation, and Usage
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 13, 2024 · Backend Development

Understanding Java Atomic Variables and Their Applications in Concurrent Programming

This article provides a comprehensive guide to Java atomic variables, explaining their core concepts, underlying CAS mechanism, key classes such as AtomicInteger, AtomicLong, AtomicReference, and AtomicBoolean, and demonstrating practical code examples, use‑cases, performance benefits, limitations, and comparisons with traditional lock‑based synchronization.

Atomic VariablesCASconcurrency
0 likes · 21 min read
Understanding Java Atomic Variables and Their Applications in Concurrent Programming
JD Tech Talk
JD Tech Talk
Aug 12, 2024 · Backend Development

Designing High‑Concurrency Systems: From Single‑Machine Optimizations to Distributed Architecture

This article explains how to build high‑concurrency systems by analyzing single‑machine hardware and code optimizations, clarifying multithreading versus asynchronous methods, and then scaling horizontally and vertically with caching, partitioning, and distributed inventory management to achieve stable, performant services for large‑scale e‑commerce workloads.

Backend Architectureasynchronous programminghigh concurrency
0 likes · 18 min read
Designing High‑Concurrency Systems: From Single‑Machine Optimizations to Distributed Architecture
Liangxu Linux
Liangxu Linux
Aug 4, 2024 · Fundamentals

Unlock CPU Performance: Master Hyper‑Threading and Affinity on Linux

This article explains hyper‑threading fundamentals, distinguishes physical, logical, and CPU cores, shows how to query CPU topology on Linux, introduces the concept of CPU affinity, demonstrates using the taskset command and related syscalls, and provides C API examples for setting process and thread affinity.

CPU affinityHyper-threadingLinux
0 likes · 14 min read
Unlock CPU Performance: Master Hyper‑Threading and Affinity on Linux
MaGe Linux Operations
MaGe Linux Operations
Jul 25, 2024 · Fundamentals

Unlock Python Multithreading: A Complete Guide to Threads, Locks, and Queues

This article provides a comprehensive overview of Python multithreading, covering basic concepts, the _thread and threading modules, thread creation methods, synchronization primitives like Lock and RLock, thread-local storage, thread pools, and the differences between multithreading and multiprocessing for both CPU‑bound and I/O‑bound workloads.

LockPythonQueue
0 likes · 24 min read
Unlock Python Multithreading: A Complete Guide to Threads, Locks, and Queues
Meituan Technology Team
Meituan Technology Team
Jul 18, 2024 · Fundamentals

Multithreading Programming: Concepts, Synchronization, and Best Practices

Multithreaded programming splits tasks across logical and hardware threads to exploit multicore CPUs, requiring careful use of synchronization primitives such as mutexes, read‑write locks, condition variables, and lock‑free atomics, while avoiding pitfalls like race conditions, deadlocks, and false sharing for correct, high‑performance software.

CLockSynchronization
0 likes · 65 min read
Multithreading Programming: Concepts, Synchronization, and Best Practices
Selected Java Interview Questions
Selected Java Interview Questions
Jul 12, 2024 · Backend Development

Efficient Large File Upload and Database Insertion with Spring Boot, Vue, and Multithreading

This article demonstrates how to implement a high‑performance file upload system using Vue's Element Plus component on the frontend and Spring Boot on the backend, comparing single‑row inserts, batch inserts, and a multithreaded producer‑consumer approach to dramatically reduce MySQL insertion time.

Batch InsertSpring BootVue
0 likes · 10 min read
Efficient Large File Upload and Database Insertion with Spring Boot, Vue, and Multithreading
IT Architects Alliance
IT Architects Alliance
Jul 11, 2024 · Databases

Why Redis Is So Fast: Single‑Threaded Design, Multi‑Threaded I/O, and Performance Characteristics

This article explains how Redis achieves extremely high throughput—over 800 k QPS for simple commands and up to 1 M QPS with pipelining—through its C implementation, in‑memory data store, single‑threaded event loop, I/O multiplexing, and optional multithreaded I/O introduced in later versions.

I/O MultiplexingSingle‑threadedmultithreading
0 likes · 16 min read
Why Redis Is So Fast: Single‑Threaded Design, Multi‑Threaded I/O, and Performance Characteristics
Architect
Architect
Jul 7, 2024 · Databases

Why Is Redis So Fast? Inside Its Single‑Threaded and Multithreaded Architecture

This article explains how Redis achieves tens of thousands of QPS on average hardware, breaks down the technical reasons behind its speed—including C implementation, in‑memory design, epoll‑based I/O multiplexing, and a single‑threaded event loop—while also detailing the evolution to multithreaded I/O in later versions.

Database ArchitectureSingle‑threadedevent loop
0 likes · 19 min read
Why Is Redis So Fast? Inside Its Single‑Threaded and Multithreaded Architecture
Open Source Tech Hub
Open Source Tech Hub
Jul 5, 2024 · Backend Development

What’s New in Swoole v6.0? Multithreading, Coroutines, and Async I/O for PHP

Swoole v6.0 introduces multithreaded coroutine support, async file I/O via io_uring, new thread‑related classes, upgraded Boost Context, numerous bug fixes and kernel optimizations, expanding PHP’s capabilities beyond traditional web workloads to high‑performance networking, game servers, and micro‑services.

Network programmingPHPmultithreading
0 likes · 7 min read
What’s New in Swoole v6.0? Multithreading, Coroutines, and Async I/O for PHP
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 1, 2024 · Backend Development

Resolving Data Contamination in Multithreaded Security Testing by Redesigning Class Attributes in Python

This article explains how using a shared class attribute to store open ports in a Python security‑testing framework can cause data contamination across threads, demonstrates the problem with example code, and presents three solutions—reinitializing the attribute, using contextvars, and employing threading.local—to ensure thread‑local isolation and accurate port scanning.

Class AttributesContextVarPython
0 likes · 10 min read
Resolving Data Contamination in Multithreaded Security Testing by Redesigning Class Attributes in Python
Selected Java Interview Questions
Selected Java Interview Questions
Jun 18, 2024 · Databases

Why Redis Is So Fast: Single‑Threaded Core, Multi‑Threaded I/O and Performance Mechanics

The article explains how Redis achieves high QPS by using an in‑memory, single‑threaded event loop for simple commands, leverages I/O multiplexing (epoll/select/kqueue) and optional multi‑threaded I/O for heavy operations, and outlines its evolution from a pure reactor model to a hybrid multi‑threaded architecture.

I/O MultiplexingSingle Threaddatabases
0 likes · 17 min read
Why Redis Is So Fast: Single‑Threaded Core, Multi‑Threaded I/O and Performance Mechanics
dbaplus Community
dbaplus Community
Jun 16, 2024 · Backend Development

Building a Scalable MySQL Data Migration Service with Microservices and Design Patterns

This article presents a comprehensive guide to designing and implementing a Java‑based MySQL large‑table migration tool using microservice architecture, multiple design patterns, multithreading, custom logging, and flexible migration modes, complete with code snippets, repository links, and deployment considerations.

Data MigrationDesign PatternsJava
0 likes · 22 min read
Building a Scalable MySQL Data Migration Service with Microservices and Design Patterns
MaGe Linux Operations
MaGe Linux Operations
Jun 12, 2024 · Fundamentals

Boost Python Performance: Master Thread Pools vs Process Pools

This guide explains Python's multithreading and multiprocessing concepts, compares thread pools and process pools, provides practical code examples for task execution and file downloading, and offers best‑practice advice for efficient concurrent programming.

ProcessPoolExecutorPythonThreadPoolExecutor
0 likes · 14 min read
Boost Python Performance: Master Thread Pools vs Process Pools
Cognitive Technology Team
Cognitive Technology Team
Jun 10, 2024 · Backend Development

Recursive Update Bug in ConcurrentHashMap.computeIfAbsent Causing Infinite Loop and CPU Spike

The article explains a bug in Java's ConcurrentHashMap.computeIfAbsent that can cause recursive updates and infinite loops, leading to CPU spikes, and shows that newer Java versions throw an IllegalStateException while recommending avoiding nested computeIfAbsent/putIfAbsent calls, with a code example.

BackendConcurrentHashMapJava
0 likes · 3 min read
Recursive Update Bug in ConcurrentHashMap.computeIfAbsent Causing Infinite Loop and CPU Spike
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 9, 2024 · Backend Development

Understanding RequestContextHolder Issues in Multithreaded Spring MVC Applications

This article explains why RequestContextHolder fails to retrieve the HttpServletRequest in a multithreaded Spring MVC environment, demonstrates the problem with a concrete example, analyzes the underlying thread‑local handling of request attributes, and clarifies the default non‑inheritable behavior that leads to null requests.

JavaRequestContextHolderServletRequestAttributes
0 likes · 8 min read
Understanding RequestContextHolder Issues in Multithreaded Spring MVC Applications
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jun 7, 2024 · Fundamentals

Understanding Java CAS and AQS: Unlock Lock-Free Concurrency

This article explains the principles and implementation of Java's Compare-and-Swap (CAS) and AbstractQueuedSynchronizer (AQS), illustrating how CAS enables lock‑free algorithms and how AQS underpins high‑level synchronization constructs like ReentrantLock and CountDownLatch, while also providing practical step‑by‑step examples.

AQSCASJava
0 likes · 5 min read
Understanding Java CAS and AQS: Unlock Lock-Free Concurrency
JD Cloud Developers
JD Cloud Developers
Jun 3, 2024 · Big Data

Speed Up Blacklist Filtering to Milliseconds with Bitmaps and Multithreading

The article examines performance bottlenecks in marketing systems when filtering blacklisted accounts, proposes multithreaded processing and bitmap-based set operations—including Java BitSet and RoaringBitmap—to dramatically reduce processing time from tens of minutes to milliseconds, and discusses implementation details, memory efficiency, and broader applications such as indexing and Redis.

BitmapPerformance Optimizationmultithreading
0 likes · 13 min read
Speed Up Blacklist Filtering to Milliseconds with Bitmaps and Multithreading
Open Source Linux
Open Source Linux
Jun 1, 2024 · Fundamentals

Mastering Concurrency and Parallelism in Java: From Basics to Advanced APIs

This article explains the concepts of concurrency, parallelism, and serial execution, describes common multi‑core scheduling algorithms, and demonstrates Java's concurrent programming tools—including Future, Fork/Join, Stream API, and CompletableFuture—through clear code examples and practical guidelines.

CompletableFutureFutureJava
0 likes · 20 min read
Mastering Concurrency and Parallelism in Java: From Basics to Advanced APIs
Alibaba Cloud Developer
Alibaba Cloud Developer
May 24, 2024 · Backend Development

Scalable Architecture for Community & E‑Commerce: Sharding, Caching & Distributed Transactions

This article outlines a comprehensive backend architecture for community platforms and billion‑level e‑commerce systems, covering microservice decomposition, DDD modeling, caching strategies, Redis clustering, message‑queue decoupling, database sharding, read‑write separation, distributed transaction approaches, multithreaded data migration, and massive counting techniques.

Distributed TransactionsMicroservicesSystem Architecture
0 likes · 14 min read
Scalable Architecture for Community & E‑Commerce: Sharding, Caching & Distributed Transactions
Liangxu Linux
Liangxu Linux
May 19, 2024 · Fundamentals

Mastering Thread Safety: Turn Multithreaded Code into a Well‑Behaved Cat

This article explains why multithreaded programs often feel like untamable beasts, introduces the core concept of thread safety, distinguishes private and shared resources, shows concrete C/C++ examples of safe and unsafe patterns, and outlines practical techniques such as thread‑local storage, read‑only globals, atomic operations and synchronization to write reliable concurrent code.

C++Locksmultithreading
0 likes · 15 min read
Mastering Thread Safety: Turn Multithreaded Code into a Well‑Behaved Cat
IT Services Circle
IT Services Circle
May 16, 2024 · Fundamentals

Thread Safety Explained: Private vs Shared Resources and Practical Guidelines

This article demystifies thread safety by comparing private and shared resources, defining when code is thread‑safe, illustrating common pitfalls with C/C++ examples, and presenting practical techniques such as using thread‑local storage, read‑only globals, atomic operations, and synchronization to write reliable multithreaded programs.

atomic operationsmultithreadingshared resources
0 likes · 16 min read
Thread Safety Explained: Private vs Shared Resources and Practical Guidelines
Liangxu Linux
Liangxu Linux
May 14, 2024 · Fundamentals

Mastering CPU Affinity and Hyper‑Threading on Linux

This guide explains the concepts of Hyper‑Threading, physical vs logical CPUs, how to query CPU information on Linux, and provides detailed instructions for using the taskset command and related programming APIs to set and retrieve CPU affinity for processes and threads.

CPU affinityLinuxmultithreading
0 likes · 12 min read
Mastering CPU Affinity and Hyper‑Threading on Linux
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 14, 2024 · Backend Development

How Spring 6.2 Eliminates Bean Initialization Blocking and Boosts Startup Speed

Spring 6.2 introduces asynchronous bean initialization, a new addSingletonCallback mechanism, global transaction rollback settings, and injection performance optimizations, eliminating blocking during multi‑threaded event publishing and dramatically reducing startup time, as demonstrated with code examples and performance test results.

Bean InitializationPerformance Optimizationmultithreading
0 likes · 9 min read
How Spring 6.2 Eliminates Bean Initialization Blocking and Boosts Startup Speed
Ops Development & AI Practice
Ops Development & AI Practice
May 6, 2024 · Fundamentals

Mastering Semaphores: How to Safely Synchronize Threads in Multithreaded Apps

Semaphores, introduced by Dijkstra, are powerful synchronization primitives that manage concurrent thread access to shared resources through atomic P (wait) and V (signal) operations, offering flexibility and deadlock avoidance while posing challenges like complex state management and performance overhead.

Synchronizationmultithreadingprogramming fundamentals
0 likes · 5 min read
Mastering Semaphores: How to Safely Synchronize Threads in Multithreaded Apps
Liangxu Linux
Liangxu Linux
Apr 9, 2024 · Fundamentals

How to Handle Signals in Multithreaded Linux Programs (C Example)

This article explains the differences between threads and processes in Linux, introduces the concept of POSIX signals, describes how signals are delivered and handled in multithreaded programs, and provides a complete C example demonstrating proper signal handling across threads.

CLinuxPOSIX
0 likes · 5 min read
How to Handle Signals in Multithreaded Linux Programs (C Example)
Java Captain
Java Captain
Mar 25, 2024 · Fundamentals

Understanding Java ThreadLocal: Mechanism, Use Cases, and Best Practices

ThreadLocal in Java provides thread‑local variables by maintaining a per‑thread map, enabling data isolation, simplifying inter‑thread data transfer, and storing context information, while requiring careful handling to avoid memory leaks, thread‑pool contamination, and overuse.

JavaThreadLocalbest practices
0 likes · 5 min read
Understanding Java ThreadLocal: Mechanism, Use Cases, and Best Practices
JD Retail Technology
JD Retail Technology
Mar 20, 2024 · Backend Development

Multithreaded Pagination Query with Java ThreadPoolExecutor: Principles, Parameters, and Usage

This article explains how using a Java thread pool for multithreaded pagination can dramatically speed up large‑scale data queries, outlines thread‑pool concepts and benefits, details ThreadPoolExecutor parameters and work‑queue options, and reviews common rejection policies and built‑in pool factories.

BackendJavaThreadPool
0 likes · 6 min read
Multithreaded Pagination Query with Java ThreadPoolExecutor: Principles, Parameters, and Usage
IT Services Circle
IT Services Circle
Mar 17, 2024 · Backend Development

Understanding the volatile Keyword in Java Concurrency

This article explains the Java volatile keyword, covering its underlying principles, effects on visibility and instruction reordering, appropriate usage scenarios, limitations, and provides a practical code example demonstrating how volatile ensures thread visibility and prevents dead loops in multithreaded programs.

CASJavaatomic
0 likes · 6 min read
Understanding the volatile Keyword in Java Concurrency
Liangxu Linux
Liangxu Linux
Mar 17, 2024 · Fundamentals

Master Linux Synchronization: From Semaphores to Mutexes with Practical Code

Learn the core principles of synchronization and mutual exclusion in multi‑process or multi‑threaded Linux environments, explore design concepts such as atomic operations and deadlock avoidance, and see complete POSIX‑thread code examples using semaphores, condition variables, mutexes and spinlocks.

LinuxPOSIXSynchronization
0 likes · 8 min read
Master Linux Synchronization: From Semaphores to Mutexes with Practical Code
Java Tech Enthusiast
Java Tech Enthusiast
Mar 16, 2024 · Backend Development

Common Causes of 100% CPU Usage in Java Backend Services

Typical reasons for Java backend services hitting 100 % CPU include fetching massive data sets, misusing Kafka auto‑acknowledge, infinite loops or recursion, thread‑pool overload causing context‑switch thrashing, bulk file synchronization, lock‑order deadlocks, poorly designed regular expressions, and intensive real‑time calculations under high concurrency.

CPUJavaKafka
0 likes · 8 min read
Common Causes of 100% CPU Usage in Java Backend Services
macrozheng
macrozheng
Mar 15, 2024 · Backend Development

Why Does My Java Service Hit 100% CPU? 8 Real-World Causes & Fixes

This article examines common reasons behind persistent 100% CPU usage in Java backend systems—ranging from excessive full GC and Kafka auto‑acknowledgment to dead loops, thread‑pool overload, massive file sync, deadlocks, inefficient regex and heavy real‑time calculations—offering practical diagnostics and solutions.

CPUmultithreading
0 likes · 10 min read
Why Does My Java Service Hit 100% CPU? 8 Real-World Causes & Fixes
Alibaba Cloud Developer
Alibaba Cloud Developer
Mar 15, 2024 · Fundamentals

Unlocking High-Performance Multithreading: Lock-Free Techniques in iLogtail

This article explores the fundamentals of multithreaded programming, comparing traditional lock-based synchronization with advanced lock-free techniques, and demonstrates how iLogtail implements thread models, memory barriers, atomic operations, spin locks, double-buffering, and deferred reclamation to achieve scalable, high-performance concurrency.

CMemory ModeliLogtail
0 likes · 25 min read
Unlocking High-Performance Multithreading: Lock-Free Techniques in iLogtail
MaGe Linux Operations
MaGe Linux Operations
Mar 6, 2024 · Backend Development

Mastering Thread Safety in Python: Locks, Conditions, and More

This article explains thread safety in Python, illustrates race conditions with a shared counter example, and demonstrates how various synchronization primitives—including Lock, RLock, Condition, Event, and Semaphore—can be used to coordinate threads safely and avoid deadlocks.

PythonSynchronizationconcurrency
0 likes · 24 min read
Mastering Thread Safety in Python: Locks, Conditions, and More
Java Captain
Java Captain
Mar 1, 2024 · Backend Development

Using Java Annotations to Solve Concurrency Timing Challenges

The article explains how Java's annotation mechanism, including @ThreadSafe, @NotThreadSafe, @GuardedBy, and @Immutable, can be applied to clarify and manage concurrent behavior, helping developers resolve the timing uncertainties inherent in multithreaded programming.

Javaannotationsconcurrency
0 likes · 5 min read
Using Java Annotations to Solve Concurrency Timing Challenges
Architect's Guide
Architect's Guide
Mar 1, 2024 · Backend Development

Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions

The article explains how to execute parallel tasks with CompletableFuture, why @Async cannot guarantee transactional integrity in a multi‑threaded Spring environment, and presents a programmatic transaction approach—including copying transaction resources between threads—to achieve consistent commit or rollback across concurrent operations.

CompletableFutureJavaProgrammaticTransaction
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions
Java Tech Enthusiast
Java Tech Enthusiast
Feb 28, 2024 · Backend Development

Understanding Java Processes, Threads, and Thread Creation Techniques

The article clarifies Java processes and threads using a game analogy, then demonstrates three thread‑creation techniques—extending Thread, implementing Runnable, and implementing Callable with FutureTask—while covering run vs start, thread control methods such as sleep, join, and daemon settings.

CallableJavaRunnable
0 likes · 9 min read
Understanding Java Processes, Threads, and Thread Creation Techniques
Su San Talks Tech
Su San Talks Tech
Feb 26, 2024 · Backend Development

Why Does My Java Service Hit 100% CPU? 8 Real-World Causes and Fixes

This article examines eight common reasons why Java backend services experience 100% CPU usage—such as fetching excessive data, automatic Kafka acknowledgments, infinite loops, multithreaded imports, massive file syncs, deadlocks, inefficient regular expressions, and heavy real‑time calculations—and provides practical mitigation strategies.

CPUJavaKafka
0 likes · 9 min read
Why Does My Java Service Hit 100% CPU? 8 Real-World Causes and Fixes
Su San Talks Tech
Su San Talks Tech
Feb 15, 2024 · Backend Development

How to Ensure Transaction Rollback in Spring Multithreaded Operations

This article explains why the @Transactional annotation fails in Spring when using multithreading, demonstrates a failing example, and provides a solution using manual SqlSession management to guarantee that all database changes are rolled back if any thread encounters an exception.

JavaMyBatismultithreading
0 likes · 10 min read
How to Ensure Transaction Rollback in Spring Multithreaded Operations