Tagged articles
2072 articles
Page 4 of 21
Java Tech Enthusiast
Java Tech Enthusiast
Apr 19, 2025 · Fundamentals

Understanding CPU Usage Spikes: Pipeline, Locks, and Optimization

The article explains how CPU pipelines, cache misses, branch‑prediction failures and lock contention cause non‑linear usage spikes, illustrates common pitfalls such as infinite loops, lock‑heavy spinning and catastrophic regex backtracking, and offers practical detection with perf and three rules—avoid busy‑waiting, use cache‑friendly layouts, and limit thread contention.

CPUconcurrencylow-level
0 likes · 6 min read
Understanding CPU Usage Spikes: Pipeline, Locks, and Optimization
Python Programming Learning Circle
Python Programming Learning Circle
Apr 17, 2025 · Fundamentals

Understanding Processes, Threads, and the GIL in Python

This article explains the concepts of processes and threads, describes Python's Global Interpreter Lock (GIL) and its impact on concurrency, compares the low‑level _thread module with the higher‑level threading module, and provides example code illustrating thread creation, synchronization with locks, and common pitfalls.

GILLockconcurrency
0 likes · 5 min read
Understanding Processes, Threads, and the GIL in Python
FunTester
FunTester
Apr 16, 2025 · Backend Development

Mastering Go: A Curated Collection of Common Pitfalls and How to Avoid Them

This curated collection gathers eleven in‑depth articles covering the most frequent Go programming mistakes—from optimization and unit testing to concurrency, error handling, and code organization—providing practical examples, dates, and direct links for developers seeking to improve code quality and avoid common pitfalls.

Backend DevelopmentError HandlingGo
0 likes · 3 min read
Mastering Go: A Curated Collection of Common Pitfalls and How to Avoid Them
FunTester
FunTester
Apr 14, 2025 · Backend Development

Common Mistakes in Go Unit Testing and How to Avoid Them

This article examines nine frequent errors developers make when writing Go unit tests—such as improper test classification, neglecting the race detector, ignoring parallel and shuffle flags, avoiding table‑driven tests, using sleep, mishandling time APIs, overlooking httptest/iotest, misusing benchmarks, and skipping fuzz testing—providing analysis and concrete code‑based solutions to improve test reliability and efficiency.

BenchmarkingGoconcurrency
0 likes · 11 min read
Common Mistakes in Go Unit Testing and How to Avoid Them
Java Tech Enthusiast
Java Tech Enthusiast
Apr 12, 2025 · Backend Development

Understanding AtomicLong vs LongAdder in Java Concurrency

In high‑concurrency Java applications, LongAdder—introduced in JDK 8 and using partitioned cells to reduce contention—generally outperforms the single‑value AtomicLong, which relies on CAS and can cause CPU waste under heavy load, so Alibaba advises LongAdder for scalable distributed counters, though memory usage and workload specifics must be considered.

BackendCASJava
0 likes · 7 min read
Understanding AtomicLong vs LongAdder in Java Concurrency
Cognitive Technology Team
Cognitive Technology Team
Apr 12, 2025 · Backend Development

Using CompletableFuture with Streams for Parallel Execution in Java

The article explains how to correctly combine Java's CompletableFuture with Stream API to achieve true asynchronous parallelism, highlights common pitfalls that lead to sequential execution, and provides the proper pattern of creating a CompletableFuture stream followed by a terminal operation.

CompletableFutureJavaParallelism
0 likes · 3 min read
Using CompletableFuture with Streams for Parallel Execution in Java
Cognitive Technology Team
Cognitive Technology Team
Apr 11, 2025 · Backend Development

Understanding Netty 4 Thread Model: Master‑Worker Multithreading and EventLoop Design

Netty 4 employs a global multithreaded, locally single‑threaded (event‑loop) architecture where a boss thread pool accepts connections and delegates them to worker thread pools, each containing NioEventLoop instances with selectors, task queues, and pipelines, ensuring lock‑free, ordered processing while avoiding thread blocking.

EventLoopJavaNetty
0 likes · 5 min read
Understanding Netty 4 Thread Model: Master‑Worker Multithreading and EventLoop Design
Ma Wei Says
Ma Wei Says
Apr 5, 2025 · Backend Development

Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis

This article explains why simple GET‑modify‑SET inventory updates cause overselling in flash‑sale spikes and presents several Redis‑based solutions—including Lua scripts, WATCH‑based optimistic locks, distributed SETNX locks, and asynchronous queue processing—detailing their implementation, advantages, and trade‑offs.

BackendLua Scriptconcurrency
0 likes · 8 min read
Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis
21CTO
21CTO
Apr 3, 2025 · Artificial Intelligence

Can Go Outperform Python in Machine Learning? Discover Its Hidden Advantages

While Python dominates the machine learning ecosystem, Go offers compelling performance, concurrency, and static typing advantages, making it a strong contender for high‑throughput prediction services, large data pipelines, resource‑constrained environments, and custom ML components, especially when teams already leverage Go in production.

GoML Librariesconcurrency
0 likes · 13 min read
Can Go Outperform Python in Machine Learning? Discover Its Hidden Advantages
Code Ape Tech Column
Code Ape Tech Column
Apr 3, 2025 · Backend Development

Implementing a FIFO Export Queue for Large Data Exports in a Spring Backend

The article describes a backend solution that uses a fixed‑size FIFO queue to throttle concurrent MySQL export operations, provides Java implementations of the ExportQueue, an abstract EasyExcel‑based exporter, a concrete ExportImpl service, and a test controller, and discusses remaining challenges and alternative approaches.

ExportJavaQueue
0 likes · 10 min read
Implementing a FIFO Export Queue for Large Data Exports in a Spring Backend
DaTaobao Tech
DaTaobao Tech
Apr 2, 2025 · Backend Development

Understanding Java Virtual Threads: From Traditional Thread Models to Stackful Coroutines

The article traces Java’s concurrency evolution from heavyweight thread‑per‑request and complex reactive models to JDK 21’s virtual threads, which act as stack‑ful coroutines offering lightweight, heap‑allocated threads, full stack traces, and blocking‑I/O compatibility while preserving the familiar thread API.

CoroutinesJDK21Java
0 likes · 24 min read
Understanding Java Virtual Threads: From Traditional Thread Models to Stackful Coroutines
Architect's Guide
Architect's Guide
Apr 2, 2025 · Backend Development

Implementing High‑Concurrency SecKill (Flash Sale) in SpringBoot: Locking, Transaction, and Queue Strategies

This article demonstrates how to simulate a high‑concurrency flash‑sale scenario with SpringBoot and MySQL, analyzes why naive lock‑and‑transaction code causes overselling, and presents six refined solutions—including early locking, AOP, pessimistic and optimistic database locks, blocking queues, and Disruptor queues—along with performance observations and a concise summary.

LockQueueSeckill
0 likes · 22 min read
Implementing High‑Concurrency SecKill (Flash Sale) in SpringBoot: Locking, Transaction, and Queue Strategies
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 1, 2025 · Fundamentals

Why Do Deadlocks Happen and How Can You Prevent Them?

This article explains what deadlocks are, outlines the four classic conditions that cause them, provides Java thread and MySQL transaction examples, and offers practical solutions such as consistent lock ordering, timeout settings, batch updates, and shortening transaction duration to prevent deadlocks.

concurrencydatabasedeadlock
0 likes · 5 min read
Why Do Deadlocks Happen and How Can You Prevent Them?
Java Backend Technology
Java Backend Technology
Mar 31, 2025 · Backend Development

Boost Database Query Performance with Spring AOP: Parallel IN Splitting Technique

This article explains how to improve slow PostgreSQL IN queries caused by large parameter lists by defining a custom Spring AOP annotation that automatically splits the parameter set, runs the sub‑queries concurrently in multiple threads, and merges the results back together, complete with code examples and usage guidelines.

Database Optimizationannotationaop
0 likes · 11 min read
Boost Database Query Performance with Spring AOP: Parallel IN Splitting Technique
FunTester
FunTester
Mar 29, 2025 · Backend Development

7 Common Go Concurrency Pitfalls and How to Avoid Them

This article examines frequent mistakes developers make when writing concurrent Go programs—such as misusing context, leaking goroutines, mishandling channels, and causing data races—and provides concrete code examples, impact analyses, and best‑practice recommendations to write safer, more efficient Go concurrency code.

ChannelGoGoroutine
0 likes · 9 min read
7 Common Go Concurrency Pitfalls and How to Avoid Them
Su San Talks Tech
Su San Talks Tech
Mar 28, 2025 · Backend Development

Unlocking Java’s Synchronized: How the JVM Implements Locks

This article explains the low‑level implementation of Java's synchronized keyword, covering monitorenter/monitorexit bytecode, object header structures, Mark Word layouts, and the evolution from heavyweight locks to biased and lightweight locks with lock‑upgrade mechanisms.

JVMJavaLock
0 likes · 11 min read
Unlocking Java’s Synchronized: How the JVM Implements Locks
Deepin Linux
Deepin Linux
Mar 27, 2025 · Fundamentals

Understanding Linux Memory Barriers: Concepts, Types, and Implementation

This article explains why modern multi‑core CPUs need memory barriers, describes the different kinds of barriers (full, read, write), shows how they are implemented in the Linux kernel and hardware, and illustrates their use in multithreaded and cache‑coherent programming.

CPU architecturecache coherenceconcurrency
0 likes · 41 min read
Understanding Linux Memory Barriers: Concepts, Types, and Implementation
Cognitive Technology Team
Cognitive Technology Team
Mar 25, 2025 · Fundamentals

Understanding the Java Memory Model and Its Interaction with Hardware Memory Architecture

This article explains how the Java Memory Model defines the interaction between threads, thread stacks, and the heap, illustrates these concepts with diagrams and example code, and discusses how modern hardware memory architecture, caches, and CPU registers affect visibility and race conditions in concurrent Java programs.

HeapJavaMemory Model
0 likes · 11 min read
Understanding the Java Memory Model and Its Interaction with Hardware Memory Architecture
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 24, 2025 · Fundamentals

What’s New in Java 24? Explore 8 Game‑Changing Preview Features

This article announces the updated Spring Boot 3 case‑study e‑book with 108 examples and then dives into Java 24’s latest preview features—enhanced pattern matching, flexible constructors, module import, single‑file source, custom stream collectors, Vector API, scoped values, and structured concurrency—complete with code snippets and links.

JavaPreviewFeaturesconcurrency
0 likes · 10 min read
What’s New in Java 24? Explore 8 Game‑Changing Preview Features
The Dominant Programmer
The Dominant Programmer
Mar 22, 2025 · Backend Development

Java Performance Optimization: From Basics to Mastery, Techniques to Make Your Code Fly

This article explains why Java performance matters, outlines fundamental principles, and provides concrete code, memory, concurrency, I/O, and database optimization techniques, along with profiling tools, common pitfalls, real‑world case studies, and emerging trends to help developers build faster, more stable applications.

Database TuningJavaMemory Management
0 likes · 8 min read
Java Performance Optimization: From Basics to Mastery, Techniques to Make Your Code Fly
Java Captain
Java Captain
Mar 21, 2025 · Backend Development

Request Merging and Batch Processing in Java Spring Boot to Reduce Database Connections

This article explains how to merge multiple user‑detail requests into a single database query using a blocking queue, scheduled thread pool, and CompletableFuture in Spring Boot, providing code examples, a high‑concurrency test, and discussion of trade‑offs such as added latency and timeout handling.

Batch ProcessingCompletableFutureJava
0 likes · 13 min read
Request Merging and Batch Processing in Java Spring Boot to Reduce Database Connections
JD Cloud Developers
JD Cloud Developers
Mar 21, 2025 · Fundamentals

Master Go Basics: From Variables to Concurrency in One Guide

This article introduces Go language fundamentals for developers familiar with other object‑oriented languages, covering variable and constant declarations, zero values, methods, structs, interfaces, slices, maps, goroutines, channels, mutexes, and error handling with clear code examples and explanations.

GoTutorialbasics
0 likes · 25 min read
Master Go Basics: From Variables to Concurrency in One Guide
Java Backend Full-Stack
Java Backend Full-Stack
Mar 21, 2025 · Interview Experience

Only Four Interviews After a Layoff: My Takeaways

After being laid off, the author interviewed only four companies, detailing each interview’s technical questions—from Spring Cloud and MySQL to concurrency and design patterns—and reflecting on the interviewers’ professionalism, the relevance of his skill set, and the importance of matching resumes to job requirements.

JavaSpringCloudconcurrency
0 likes · 6 min read
Only Four Interviews After a Layoff: My Takeaways
Deepin Linux
Deepin Linux
Mar 21, 2025 · Fundamentals

Understanding Memory Pools: Concepts, Implementations, and Practical Use Cases

This article explains the concept of memory pools, how they reduce allocation overhead and fragmentation compared to traditional malloc/new, describes various pool designs and Linux kernel APIs, provides multiple C and C++ implementations, and discusses performance benefits and typical application scenarios such as servers, real‑time and embedded systems.

C++Linux kernelallocation
0 likes · 40 min read
Understanding Memory Pools: Concepts, Implementations, and Practical Use Cases
Java Tech Enthusiast
Java Tech Enthusiast
Mar 19, 2025 · Backend Development

Java Backend Interview Topics: Thread‑Safe Collections, JVM Memory, Optimistic Lock, Caching, and More

The article reviews key Java backend interview topics—including thread‑safe collections, JVM memory layout and heap tuning, Full GC troubleshooting, Java 8 features, optimistic locking, stock‑over‑sell handling with Redis, MySQL scaling, cache‑consistency patterns, anti‑bot safeguards, and Bloom filters—while noting JD’s recent 30% salary hike for algorithm engineers.

BackendJVMJava
0 likes · 22 min read
Java Backend Interview Topics: Thread‑Safe Collections, JVM Memory, Optimistic Lock, Caching, and More
Code Ape Tech Column
Code Ape Tech Column
Mar 19, 2025 · Backend Development

ExecutorService vs CompletionService: In‑Depth Comparison and Practical Usage in Java

This article explains the differences between ExecutorService and CompletionService, demonstrates how to replace a simple Future‑based approach with CompletionService for faster result retrieval, analyzes the underlying source code, and outlines typical use‑cases such as load‑balancing and early‑return patterns in concurrent Java applications.

AsyncCompletionServiceExecutorService
0 likes · 12 min read
ExecutorService vs CompletionService: In‑Depth Comparison and Practical Usage in Java
Architect's Must-Have
Architect's Must-Have
Mar 18, 2025 · Backend Development

Why Netty Uses FastThreadLocal and How It Outperforms JDK ThreadLocal

This article explains the motivation behind Netty's FastThreadLocal, details its internal design using an indexed array to avoid hash collisions, analyzes the core source code of InternalThreadLocalMap, FastThreadLocalThread, and FastThreadLocal, and discusses performance implications and reclamation strategies.

FastThreadLocalJavaMemory Management
0 likes · 10 min read
Why Netty Uses FastThreadLocal and How It Outperforms JDK ThreadLocal
Tencent Cloud Developer
Tencent Cloud Developer
Mar 18, 2025 · Fundamentals

Java vs Go: Syntax, OOP, Error Handling, Concurrency, Garbage Collection and Performance Comparison

The article compares Java and Go across syntax, variable declaration, object‑oriented features, error handling, concurrency models, garbage collection, resource usage, and ecosystem maturity, concluding that Go offers simpler code, lightweight concurrency and lower overhead, while Java provides a richer library ecosystem and more mature tooling, making the choice dependent on project requirements.

Error HandlingGarbage CollectionGo
0 likes · 26 min read
Java vs Go: Syntax, OOP, Error Handling, Concurrency, Garbage Collection and Performance Comparison
Lin is Dream
Lin is Dream
Mar 16, 2025 · Fundamentals

Mastering TPS and QPS: Simple Calculations and Real-World Examples

This article explains the key performance metrics TPS (transactions per second) and QPS (queries per second), provides formulas for calculating them, and demonstrates practical calculations for multi-node deployments, illustrating how request latency, thread pools, and instance count affect overall system concurrency and throughput.

QPSTPSThroughput
0 likes · 3 min read
Mastering TPS and QPS: Simple Calculations and Real-World Examples
Architecture Development Notes
Architecture Development Notes
Mar 16, 2025 · Backend Development

Choosing the Right Concurrency Model: Go vs Python vs Rust

This article compares Go, Python, and Rust concurrency implementations—covering CSP‑based goroutines, GIL constraints, and ownership‑driven thread safety—to help developers select the most suitable model for high‑throughput, CPU‑bound, or safety‑critical applications.

AsyncGoParallelism
0 likes · 9 min read
Choosing the Right Concurrency Model: Go vs Python vs Rust
FunTester
FunTester
Mar 15, 2025 · Operations

Simulating Elderly Checkout Times with ThreadLocalRandom in Java

The article revises a supermarket checkout performance test by incorporating elderly customers who take twice as long to pay, demonstrates using Java's ThreadLocalRandom to randomly assign customer age groups, modifies the pay() method to double payment time for seniors, and explains why realistic scenarios improve testing accuracy.

JavaPerformance TestingThreadLocalRandom
0 likes · 4 min read
Simulating Elderly Checkout Times with ThreadLocalRandom in Java
Ops Development & AI Practice
Ops Development & AI Practice
Mar 12, 2025 · Backend Development

Mastering Go Closures: How Functions Capture Their Environment

This article explains Go closures—what they are, how they capture surrounding variables, key characteristics, practical code examples, common pitfalls like memory leaks and concurrency issues, and typical use‑cases such as function factories, state management, callbacks, and interface implementation.

Backend DevelopmentGoGoroutine
0 likes · 7 min read
Mastering Go Closures: How Functions Capture Their Environment
Cognitive Technology Team
Cognitive Technology Team
Mar 9, 2025 · Backend Development

Understanding wait() and notify() in Java Multithreading

This article explains the concepts, usage conditions, execution flow, internal mechanisms, and best‑practice guidelines for Java's wait() and notify() methods, illustrated with a producer‑consumer example and code snippets for safe thread coordination.

JavaNotifyProducer Consumer
0 likes · 6 min read
Understanding wait() and notify() in Java Multithreading
Raymond Ops
Raymond Ops
Mar 6, 2025 · Backend Development

Why Switch from PHP to Go? Mastering Concurrency with WaitGroup and ErrGroup

This article explains why backend developers are moving from PHP to Go, outlines the concurrency challenges of high‑traffic live streaming services, and demonstrates two practical Go patterns—sync.WaitGroup and errgroup.Group—with code examples, while also warning about common closure pitfalls in loops.

GoPHP migrationWaitGroup
0 likes · 9 min read
Why Switch from PHP to Go? Mastering Concurrency with WaitGroup and ErrGroup
JavaScript
JavaScript
Mar 6, 2025 · Frontend Development

Why Promise.allSettled Beats Promise.all for Robust Async JavaScript

Promise.allSettled overcomes the fatal flaw of Promise.all by waiting for all promises to settle—whether fulfilled or rejected—returning a uniform result array that lets developers identify successful outcomes and handle failures without aborting the entire operation, enabling more resilient asynchronous code.

AsyncJavaScriptPromise
0 likes · 3 min read
Why Promise.allSettled Beats Promise.all for Robust Async JavaScript
FunTester
FunTester
Mar 6, 2025 · Backend Development

Common Mistakes with Go's select Statement and How to Fix Them

This article examines frequent errors when using Go's select statement—such as omitting a default case, misunderstanding case order, handling nil channels, missing timeout logic, and duplicate cases—explaining their impact, offering best‑practice guidance, and providing corrected code examples for each scenario.

Error HandlingGoconcurrency
0 likes · 14 min read
Common Mistakes with Go's select Statement and How to Fix Them
Architecture Digest
Architecture Digest
Mar 5, 2025 · Backend Development

Understanding Java Virtual Threads and Their Performance Benefits in Spring Boot

This article introduces Java 21's virtual threads, explains their lightweight and high‑concurrency advantages, demonstrates basic and delayed usage with code examples, shows how to enable them in Spring Boot, compares performance against traditional threads, and offers additional Java performance‑tuning techniques.

JavaJava 21Spring Boot
0 likes · 7 min read
Understanding Java Virtual Threads and Their Performance Benefits in Spring Boot
Java High-Performance Architecture
Java High-Performance Architecture
Mar 5, 2025 · Backend Development

Unlock Massive Concurrency: How Java 21 Virtual Threads Supercharge Spring Boot

Java 21’s virtual threads provide lightweight, high‑concurrency execution managed by the JVM, enabling developers to create hundreds of thousands of threads with minimal overhead; this article explains their basics, demonstrates Spring Boot integration, compares performance against traditional threads, and shares additional Java optimization techniques.

JavaSpring BootVirtual Threads
0 likes · 8 min read
Unlock Massive Concurrency: How Java 21 Virtual Threads Supercharge Spring Boot
macrozheng
macrozheng
Mar 5, 2025 · Backend Development

How to Merge Concurrent Requests in Spring Boot to Save Database Connections

This article explains how to combine multiple simultaneous user requests on the server side using a queue, scheduled thread pool and CompletableFuture in Spring Boot, reducing database connections while handling high concurrency, and discusses implementation details, testing, and potential pitfalls.

Batch ProcessingSpring Bootconcurrency
0 likes · 15 min read
How to Merge Concurrent Requests in Spring Boot to Save Database Connections
Alibaba Cloud Developer
Alibaba Cloud Developer
Mar 5, 2025 · Backend Development

Java Virtual Threads: Boost Performance, Fix Pin Issues, and Migrate Easily

This article explains the evolution of Java virtual threads in AJDK, details performance improvements, examines pinning problems caused by synchronization and native code, provides migration steps, configuration tips, and code examples, and introduces diagnostic tools for troubleshooting virtual thread issues.

JavaPinningVirtual Threads
0 likes · 22 min read
Java Virtual Threads: Boost Performance, Fix Pin Issues, and Migrate Easily
FunTester
FunTester
Mar 4, 2025 · Backend Development

Mastering Graceful Shutdown in Go: Clean Exit for Servers and Goroutines

This guide explains why graceful shutdown matters in Go programs, outlines the steps to capture termination signals, use context for coordinated goroutine exit, and properly close HTTP servers without data loss or resource leaks.

Graceful ShutdownHTTP serverResource Cleanup
0 likes · 9 min read
Mastering Graceful Shutdown in Go: Clean Exit for Servers and Goroutines
Su San Talks Tech
Su San Talks Tech
Mar 3, 2025 · Backend Development

Mastering Java Thread Pools: Architecture, Parameters, and Customization

This article provides a comprehensive guide to Java thread pools, explaining their purpose, construction parameters, execution flow, worker reuse, task retrieval with timeout, lifecycle states, shutdown mechanisms, monitoring methods, and best practices for customizing pools in real-world projects.

ExecutorServiceJavaThreadPool
0 likes · 17 min read
Mastering Java Thread Pools: Architecture, Parameters, and Customization
Open Source Tech Hub
Open Source Tech Hub
Mar 2, 2025 · Backend Development

Can PHP Achieve True Asynchronous Execution? Inside the True Async RFC

This article examines the PHP True Async RFC, outlining its goals to provide a standard C‑API for non‑blocking I/O, describing implicit versus explicit async models, presenting a scheduler‑reactor design, and showing example code that runs concurrent fibers without altering existing PHP code.

AsynchronousPHPconcurrency
0 likes · 7 min read
Can PHP Achieve True Asynchronous Execution? Inside the True Async RFC
Ops Development & AI Practice
Ops Development & AI Practice
Mar 1, 2025 · Fundamentals

Understanding Concurrency Scheduling Models: From User Threads to Go’s M:P:G Scheduler

This article explains the main concurrency scheduling models—including user‑level, kernel‑level, two‑level (M:N), and coroutine approaches—covers common scheduling algorithms, and details Go’s unique M:P:G scheduler, highlighting its principles, workflow, and advantages for high‑performance parallel execution.

GoroutineSchedulingThreads
0 likes · 9 min read
Understanding Concurrency Scheduling Models: From User Threads to Go’s M:P:G Scheduler
Cognitive Technology Team
Cognitive Technology Team
Mar 1, 2025 · Databases

Async IO Thread in Redis 8.0 M3: Design, Implementation, and Performance Evaluation

The article explains why Redis needs asynchronous IO threading, describes the shortcomings of previous IO‑thread models, details the design of the new async IO thread architecture with event‑notified client queues and thread‑safety mechanisms, and presents performance test results showing up to double the QPS and significantly lower latency.

Async IOIO Threadsconcurrency
0 likes · 15 min read
Async IO Thread in Redis 8.0 M3: Design, Implementation, and Performance Evaluation
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 26, 2025 · Backend Development

Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions

This article examines the challenges of using JPA optimistic locking for inventory deduction under high concurrency, demonstrates why naive retry logic can cause deadlocks and stale data, and walks through five progressively refined implementations that resolve transaction, caching, and isolation issues.

RetrySpring Bootconcurrency
0 likes · 13 min read
Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions
Code Mala Tang
Code Mala Tang
Feb 20, 2025 · Fundamentals

Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python

This comprehensive guide explores why locks are essential in concurrent programming, explains the principles behind mutexes, semaphores, read‑write locks, and re‑entrant locks, provides Python code examples, discusses common pitfalls like deadlocks, and offers best‑practice strategies for production environments.

Synchronizationconcurrencydeadlock
0 likes · 22 min read
Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python
FunTester
FunTester
Feb 20, 2025 · Backend Development

How to Build a Custom Multithreaded Test Engine in Java

This article walks through designing and implementing a Java multithreaded execution class for performance testing, covering thread‑pool creation, task coordination with CountDownLatch, start/stop control, and a complete demo that runs concurrent tasks with timed logging.

CountDownLatchJavaPerformance Testing
0 likes · 10 min read
How to Build a Custom Multithreaded Test Engine in Java
JD Tech
JD Tech
Feb 19, 2025 · Backend Development

Understanding the Design and Implementation of Caffeine Cache

This article provides a comprehensive walkthrough of Caffeine cache's architecture, explaining its fixed-size eviction policy, underlying data structures such as ConcurrentHashMap, MPSC buffers, Count‑Min Sketch frequency tracking, and the dynamic window‑probation‑protected zones, while detailing key methods like put, getIfPresent, and maintenance.

CacheCaffeineCount-Min Sketch
0 likes · 71 min read
Understanding the Design and Implementation of Caffeine Cache
Selected Java Interview Questions
Selected Java Interview Questions
Feb 18, 2025 · Backend Development

Why Java synchronized Is Insufficient in Distributed Systems and Alternative Lock Solutions

The article explains how Java's synchronized keyword works only within a single JVM, why it fails to provide mutual exclusion across multiple processes in distributed systems, and presents alternative distributed locking mechanisms such as database locks and Redis-based locks with code examples.

Javaconcurrencydatabase lock
0 likes · 8 min read
Why Java synchronized Is Insufficient in Distributed Systems and Alternative Lock Solutions
FunTester
FunTester
Feb 18, 2025 · Fundamentals

Understanding Mutex Locks and Their Use in Go Concurrency

This article explains what a mutex is, why it is needed in concurrent programming, shows basic lock/unlock operations with Go code examples, compares mutexes with atomic operations, and provides best‑practice guidelines to avoid deadlocks and improve performance.

Synchronizationatomicconcurrency
0 likes · 8 min read
Understanding Mutex Locks and Their Use in Go Concurrency
Radish, Keep Going!
Radish, Keep Going!
Feb 18, 2025 · Fundamentals

Which Programming Language Wins a 10 Billion Loop Test? Insights from a Community Benchmark

Ben Dicken conducted a massive benchmark running 10 billion nested loops across many languages—Zig, Julia, Perl, Elixir, Fortran, C#, Lua, and more—while the community contributed optimizations such as goroutine‑based Go improvements, sparking discussions on fair measurement, startup overhead, and concurrency advantages.

Benchmarkconcurrencyoptimization
0 likes · 3 min read
Which Programming Language Wins a 10 Billion Loop Test? Insights from a Community Benchmark
Java Tech Enthusiast
Java Tech Enthusiast
Feb 17, 2025 · Fundamentals

Why a Java Volatile Example May Terminate Without Volatile

The program that loops on a non‑volatile boolean flag sometimes terminates because changing the counter to a volatile int or to an Integer causes the JVM to emit hidden memory barriers on reference writes, making the flag visible, but this behavior is JVM‑specific and not a reliable substitute for declaring the flag volatile.

HotSpotJVMJava
0 likes · 11 min read
Why a Java Volatile Example May Terminate Without Volatile
Raymond Ops
Raymond Ops
Feb 15, 2025 · Backend Development

Why Switch from PHP to Go? Boosting Concurrency for Live Streaming

This article explains why backend developers are moving from PHP to Go, demonstrates how Go's built-in concurrency primitives like sync.WaitGroup and errgroup simplify high‑traffic live‑streaming services, and warns about common closure pitfalls when launching goroutines in loops.

Goclosureconcurrency
0 likes · 10 min read
Why Switch from PHP to Go? Boosting Concurrency for Live Streaming
Code Mala Tang
Code Mala Tang
Feb 15, 2025 · Fundamentals

Unlock Full CPU Power in Python: A Hands‑On Guide to Multiprocessing

This article explains why Python’s Global Interpreter Lock limits CPU core usage, introduces the multiprocessing module for parallel execution of CPU‑intensive tasks, and provides step‑by‑step code examples, key concepts, synchronization tools, a real‑world image‑processing case, and best practices to dramatically speed up your programs.

CPU BoundParallelismPython
0 likes · 9 min read
Unlock Full CPU Power in Python: A Hands‑On Guide to Multiprocessing
FunTester
FunTester
Feb 12, 2025 · Backend Development

Mastering Thread Coordination: Waiters, Rendezvous, Joiners in Java

The article explains the Helper class’s built‑in thread coordination operations—including Waiters, Rendezvous, Joiners, and execution‑aborting methods—detailing their APIs, usage scenarios, parameters, and behavior such as signaling, timeouts, rejoinable points, and how they differ from standard Java synchronization primitives.

Helper APIJavaSynchronization
0 likes · 12 min read
Mastering Thread Coordination: Waiters, Rendezvous, Joiners in Java
Radish, Keep Going!
Radish, Keep Going!
Feb 11, 2025 · Fundamentals

How Go 1.24’s New Spinning Mutex Boosts Performance by Up to 70%

The article explains the background of the Go mutex performance proposal, details the new spinning flag added to the mutex state, walks through fast‑path, spinning, and sleep phases of lock acquisition, presents benchmark results showing up to 70% speed‑up, and provides references for further reading.

GoRuntimeconcurrency
0 likes · 11 min read
How Go 1.24’s New Spinning Mutex Boosts Performance by Up to 70%
Go Programming World
Go Programming World
Feb 11, 2025 · Backend Development

Deep Dive into Go's sync.Map: Implementation, Usage, and Performance

An in‑depth exploration of Go’s sync.Map reveals its concurrent map implementation, covering core structures, read‑only and dirty maps, entry states, and detailed walkthroughs of Store, Load, Delete, Range, Clear, and advanced operations like LoadOrStore, CompareAndSwap, and CompareAndDelete with code examples.

GoMAPconcurrency
0 likes · 30 min read
Deep Dive into Go's sync.Map: Implementation, Usage, and Performance
Sanyou's Java Diary
Sanyou's Java Diary
Feb 10, 2025 · Backend Development

10 Essential Backend Optimization Techniques Every Developer Should Master

This comprehensive guide explores ten critical backend optimization strategies—from defensive validation and batch N+1 query elimination to asynchronous processing, parallel execution, caching, connection pooling, compression, message queuing, and design patterns—providing practical examples, Go code snippets, and best‑practice insights to boost performance and reliability.

Backend DevelopmentDesign PatternsPerformance Optimization
0 likes · 32 min read
10 Essential Backend Optimization Techniques Every Developer Should Master
Lobster Programming
Lobster Programming
Feb 10, 2025 · Backend Development

How to Choose the Right Distributed Lock: DB, Redis, or ZooKeeper?

This article explains the concept of distributed locks and compares three common implementation approaches—using a database, Redis, and ZooKeeper—detailing their mechanisms, advantages, drawbacks, and suitable scenarios for ensuring consistent access to shared resources in distributed systems.

BackendZooKeeperconcurrency
0 likes · 7 min read
How to Choose the Right Distributed Lock: DB, Redis, or ZooKeeper?
JavaScript
JavaScript
Feb 7, 2025 · Frontend Development

Mastering Promise Concurrency: Techniques to Control Async Tasks in JavaScript

This article explains how to manage Promise concurrency in JavaScript, covering built‑in methods like Promise.all, allSettled, race, any, custom throttling functions, third‑party libraries, generator‑based solutions, and message‑queue approaches to improve performance and user experience.

AsyncJavaScriptPromise
0 likes · 8 min read
Mastering Promise Concurrency: Techniques to Control Async Tasks in JavaScript
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 3, 2025 · Backend Development

Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies

This article reviews Java Spring code for a coupon claim and approval workflow, identifies concurrency and transaction issues such as missing locks and inconsistent update order, and proposes optimizations including user‑level locking, simplifying lock management, and aligning transactional update sequences to prevent deadlocks.

Code reviewJavaconcurrency
0 likes · 12 min read
Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies
Java Web Project
Java Web Project
Feb 1, 2025 · Backend Development

Choosing the Right Java Async Tool: Future, CompletableFuture, or FutureTask

This article compares three Java concurrency approaches—Future with Callable, CompletableFuture, and FutureTask—explaining their underlying principles, step‑by‑step usage, code examples, and trade‑offs so you can decide which asynchronous tool best fits your reporting workload.

CompletableFutureFutureFutureTask
0 likes · 10 min read
Choosing the Right Java Async Tool: Future, CompletableFuture, or FutureTask
Java Tech Enthusiast
Java Tech Enthusiast
Jan 31, 2025 · Backend Development

Java 21 Virtual Threads: Benefits, Usage, and Performance Comparison

Java 21’s virtual threads provide a lightweight, JVM‑managed alternative to OS threads that enables hundreds of thousands of concurrent tasks, simplifies scheduling, integrates easily into Spring Boot via a preview flag and Tomcat executor, and delivers up to five‑fold speed‑ups and lower latency in high‑load I/O‑intensive applications.

JavaSpring BootVirtual Threads
0 likes · 7 min read
Java 21 Virtual Threads: Benefits, Usage, and Performance Comparison
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
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 25, 2025 · Backend Development

Mastering CompletableFuture in Java: Basics, Advanced Features, and Best Practices

This comprehensive guide introduces Java's CompletableFuture, explains its advantages over the traditional Future API, demonstrates how to create and compose asynchronous tasks, manage thread pools, handle timeouts and cancellations, and apply robust exception handling techniques for reliable concurrent programming.

CompletableFutureException HandlingFuture
0 likes · 16 min read
Mastering CompletableFuture in Java: Basics, Advanced Features, and Best Practices
php Courses
php Courses
Jan 23, 2025 · Backend Development

PHP vs Go: Choosing the Right Language for Your Project

This article compares PHP and Go across history, ecosystem, performance, concurrency, memory management, and typical use‑cases, providing guidance on when to select PHP for rapid web development or Go for high‑performance, cloud‑native and distributed systems.

ComparisonGoPHP
0 likes · 21 min read
PHP vs Go: Choosing the Right Language for Your Project
Su San Talks Tech
Su San Talks Tech
Jan 23, 2025 · Backend Development

How to Prevent Overselling in High‑Concurrency Flash Sale Systems

This article explores common overselling problems in high‑concurrency flash‑sale scenarios and presents seven practical solutions—including lock timing adjustments, AOP locking, pessimistic and optimistic database locks, and queue‑based approaches—each illustrated with SpringBoot code and performance test results.

JavaLockSeckill
0 likes · 20 min read
How to Prevent Overselling in High‑Concurrency Flash Sale Systems
DeWu Technology
DeWu Technology
Jan 20, 2025 · Backend Development

Migrating Observability Compute Layer from Java to Rust: Ownership, Concurrency, Deployment, and Monitoring

The article details how moving a high‑throughput observability compute layer from Java to Rust—leveraging Rust’s ownership, zero‑cost async, and static binary deployment—cut memory usage by roughly 68%, CPU consumption by 40%, while outlining monitoring setup, concurrency model, and the steep learning‑curve challenges.

DeploymentObservabilityRust
0 likes · 18 min read
Migrating Observability Compute Layer from Java to Rust: Ownership, Concurrency, Deployment, and Monitoring
JD Tech Talk
JD Tech Talk
Jan 20, 2025 · Backend Development

Inventory Pre-Reservation: Challenges, Solutions, and Performance Optimizations

The article examines inventory pre‑reservation in e‑commerce, detailing performance challenges under high concurrency, and evaluates solutions such as asynchronous rate limiting, horizontal stock splitting, Redis caching, database transaction handling, deadlock avoidance, and data consistency mechanisms, highlighting a 24‑fold throughput increase.

cachingconcurrencydatabase
0 likes · 9 min read
Inventory Pre-Reservation: Challenges, Solutions, and Performance Optimizations
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
Java Architect Essentials
Java Architect Essentials
Jan 19, 2025 · Backend Development

Proper Declaration, Monitoring, and Configuration of Java Thread Pools

This article explains how to correctly declare Java thread pools using ThreadPoolExecutor, monitor their runtime status, configure parameters for CPU‑bound and I/O‑bound workloads, assign meaningful names, avoid common pitfalls such as unbounded queues and thread‑local leakage, and leverage dynamic pool frameworks.

JavaSpringBootThreadPool
0 likes · 16 min read
Proper Declaration, Monitoring, and Configuration of Java Thread Pools