Programmer XiaoFu
Author

Programmer XiaoFu

xiaofucode.com – a programmer learning guide driven by the pursuit of profit

111
Articles
0
Likes
419
Views
0
Comments
Recent Articles

Latest from Programmer XiaoFu

100 recent articles max
Programmer XiaoFu
Programmer XiaoFu
Sep 25, 2025 · Databases

Redis LRU vs Classic LRU: Differences, LFU Comparison, and How to Choose

Redis implements an approximate LRU using random sampling and timestamps, while classic LRU relies on exact access order; the article explains both LRU and LFU fundamentals, their Java implementations, Redis-specific variants, trade‑offs, use‑case recommendations, and configuration tips for selecting the optimal eviction policy.

Cache EvictionJavaLFU
0 likes · 21 min read
Redis LRU vs Classic LRU: Differences, LFU Comparison, and How to Choose
Programmer XiaoFu
Programmer XiaoFu
Sep 15, 2025 · Information Security

SSO vs OAuth2.0: Key Differences Explained for Interviews

This article compares Single Sign‑On (SSO) and OAuth2.0, detailing their conceptual distinctions, token‑based workflows, implementation frameworks like CAS, the four OAuth2.0 grant types, and how each can be used to achieve seamless authentication across applications.

CASJWTOAuth2.0
0 likes · 8 min read
SSO vs OAuth2.0: Key Differences Explained for Interviews
Programmer XiaoFu
Programmer XiaoFu
Sep 8, 2025 · Backend Development

Why My Spring Cloud Gateway Returns 404 After Nacos Config Changes – A Year-Long Debugging Tale

The article walks through a year‑long investigation of a 404 error that appears after updating Nacos dynamic routing in Spring Cloud Gateway 3.0.1, explains how stale weight caches cause the failure, and presents a custom event‑listener solution that synchronizes the gateway's weight cache with the latest Nacos configuration.

404JavaNacos
0 likes · 12 min read
Why My Spring Cloud Gateway Returns 404 After Nacos Config Changes – A Year-Long Debugging Tale
Programmer XiaoFu
Programmer XiaoFu
Sep 4, 2025 · Databases

How to Add a Column to a Ten‑Million‑Row MySQL Table Without Locking It

When a core MySQL order table reaches tens of millions of rows, adding a new column can lock the table and disrupt services, so the article walks through master‑slave switching, online DDL tools, log‑based workarounds, extension tables, JSON fields, and a final redundant‑field trick to achieve the change safely.

DDL lockJSON columnMySQL
0 likes · 7 min read
How to Add a Column to a Ten‑Million‑Row MySQL Table Without Locking It
Programmer XiaoFu
Programmer XiaoFu
Sep 1, 2025 · Fundamentals

Advanced Chain of Responsibility: Multi‑Level Validation and Workflow for Elegant Code

This article explains the Chain of Responsibility pattern, shows how to use it for multi‑stage validation and workflow scenarios, walks through a product‑creation example with concrete handlers, configuration via JSON, Spring bean injection, recursive chain assembly, and a reimbursement‑approval workflow, complete with runnable test cases.

BackendChain of ResponsibilityJava
0 likes · 20 min read
Advanced Chain of Responsibility: Multi‑Level Validation and Workflow for Elegant Code
Programmer XiaoFu
Programmer XiaoFu
Aug 12, 2025 · Backend Development

Deep Dive into an Asynchronous Spring Boot + Tesseract OCR Pipeline for Invoice Recognition

This article presents a comprehensive, step‑by‑step analysis of a high‑throughput, asynchronous OCR pipeline built with Spring Boot and Tesseract, covering system architecture, thread‑pool tuning, custom invoice‑specific model training, multi‑engine fusion, structured data extraction, performance optimizations, GPU acceleration, Kubernetes deployment, monitoring, security compliance, chaos testing, and future evolution plans.

GPUKubernetesOCR
0 likes · 12 min read
Deep Dive into an Asynchronous Spring Boot + Tesseract OCR Pipeline for Invoice Recognition
Programmer XiaoFu
Programmer XiaoFu
Jul 29, 2025 · Backend Development

How to Gracefully Implement Consistent Compensation Across Multiple Systems

The article examines the challenges of achieving distributed consistency when a business operation writes to MySQL and external systems, analyzes failure scenarios, and presents a step‑by‑step solution that splits the large transaction into small, retryable tasks with Spring afterCommit optimization.

BPMJavaMySQL
0 likes · 9 min read
How to Gracefully Implement Consistent Compensation Across Multiple Systems
Programmer XiaoFu
Programmer XiaoFu
Jul 22, 2025 · Backend Development

Mastering Cache Penetration, Avalanche, and Breakdown: Interview-Ready Answers

The article explains the concepts of cache penetration, avalanche, and breakdown, outlines their typical causes such as invalid requests, synchronized expirations, and hotspot spikes, and presents practical mitigation techniques including request validation, caching null values, Bloom filters, staggered expirations, high‑availability Redis setups, mutex locks, and random TTLs.

Bloom FilterCacheCache Avalanche
0 likes · 8 min read
Mastering Cache Penetration, Avalanche, and Breakdown: Interview-Ready Answers