Programmer XiaoFu
Author

Programmer XiaoFu

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

104
Articles
0
Likes
73
Views
0
Comments
Recent Articles

Latest from Programmer XiaoFu

100 recent articles max
Programmer XiaoFu
Programmer XiaoFu
Jul 10, 2024 · Backend Development

Why You Should Avoid Collectors.toMap in Java Streams

The article shows how using Collectors.toMap can trigger IllegalStateException for duplicate keys and NullPointerException for null values, and demonstrates proper merge functions, Optional handling, and a plain‑for‑loop alternative to safely convert a List of objects into a Map.

Collectors.toMapDuplicateKeysHashMap
0 likes · 5 min read
Why You Should Avoid Collectors.toMap in Java Streams
Programmer XiaoFu
Programmer XiaoFu
Jul 3, 2024 · Backend Development

Fast Large‑File Chunked Upload with Spring Boot and MinIO

This article walks through setting up MinIO, installing it via Docker on CentOS 7, configuring Spring Boot, and implementing chunked, instant‑resume, and resumable uploads for large files, complete with code examples, Docker commands, and troubleshooting tips.

Chunked UploadDockerJava
0 likes · 25 min read
Fast Large‑File Chunked Upload with Spring Boot and MinIO
Programmer XiaoFu
Programmer XiaoFu
Jun 27, 2024 · Backend Development

Choosing a Service Registry: In‑Depth Comparison of Zookeeper, Eureka, Nacos, Consul, and Etcd

This article explains the fundamental concepts of service registries, examines CAP theory and consensus protocols, and provides a detailed analysis of Zookeeper, Eureka, Nacos, Consul, and Etcd—including their architectures, features, trade‑offs, and practical guidance for selecting the most suitable registry for a given environment.

ConsulEtcdEureka
0 likes · 23 min read
Choosing a Service Registry: In‑Depth Comparison of Zookeeper, Eureka, Nacos, Consul, and Etcd
Programmer XiaoFu
Programmer XiaoFu
Jun 11, 2024 · Databases

10 Advanced MySQL Query Techniques Every Data Engineer Should Know

This article presents ten essential advanced MySQL concepts—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, running totals, and date‑time manipulation—each explained with clear examples and practical SQL snippets.

CASE WHENCTEDateTime
0 likes · 11 min read
10 Advanced MySQL Query Techniques Every Data Engineer Should Know
Programmer XiaoFu
Programmer XiaoFu
Jun 4, 2024 · Operations

How to Tackle a 900% CPU Spike in MySQL and Java Processes

The article walks through real interview scenarios where MySQL or Java processes consume 900% CPU, detailing step‑by‑step diagnosis with top, processlist, jstack, and concrete remediation such as adding indexes, using caches, fixing busy loops, and tuning memory.

CPUGCJava
0 likes · 12 min read
How to Tackle a 900% CPU Spike in MySQL and Java Processes
Programmer XiaoFu
Programmer XiaoFu
May 28, 2024 · Backend Development

SpringBoot Techniques for API Debounce to Eliminate Duplicate Submissions

The article explains why API debounce is essential, identifies the types of endpoints that need it, and walks through two SpringBoot solutions—Redis‑based shared cache and Redisson distributed lock—complete with custom annotations, key generation, code samples, test results, and practical limitations.

JavaSpringBootdebounce
0 likes · 14 min read
SpringBoot Techniques for API Debounce to Eliminate Duplicate Submissions
Programmer XiaoFu
Programmer XiaoFu
May 24, 2024 · Backend Development

Elegant Ways to Implement Online User Counting with Redis ZSET

This article explains how to use Redis sorted sets (ZSET) together with user token or browser fingerprint identification to add, query, and clean online user entries, providing a simple yet effective method for counting active users in real time.

ZSETfingerprintonline users
0 likes · 7 min read
Elegant Ways to Implement Online User Counting with Redis ZSET
Programmer XiaoFu
Programmer XiaoFu
May 16, 2024 · Databases

MySQL Fuzzy Search Without LIKE%: Using Full‑Text Indexes

This article explains how InnoDB full‑text search can replace LIKE% fuzzy queries by using inverted indexes, covering index structures, creation syntax, MATCH() AGAINST() modes, practical demos, query expansion, and index removal, while noting when to prefer external search engines.

Boolean ModeFull-Text SearchInverted Index
0 likes · 12 min read
MySQL Fuzzy Search Without LIKE%: Using Full‑Text Indexes
Programmer XiaoFu
Programmer XiaoFu
May 10, 2024 · Databases

From Single Node to Tank: 20 Diagrams of Redis Architecture Evolution

This article walks through Redis's architectural journey—from a lone instance to a high‑availability, high‑performance cluster—covering persistence (RDB, AOF, hybrid), master‑slave replication, Sentinel automatic failover, sharding strategies, and the modern Redis Cluster design.

ClusterHigh AvailabilityPersistence
0 likes · 19 min read
From Single Node to Tank: 20 Diagrams of Redis Architecture Evolution