Xiao Lou's Tech Notes
Author

Xiao Lou's Tech Notes

Backend technology sharing, architecture design, performance optimization, source code reading, troubleshooting, and pitfall practices

79
Articles
0
Likes
19
Views
0
Comments
Recent Articles

Latest from Xiao Lou's Tech Notes

79 recent articles
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Jun 22, 2022 · Fundamentals

Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers

This article explores the fundamentals of CPU cache hierarchy, why caches are needed, how cache inconsistency arises in multicore systems, and the mechanisms—such as cache coherence protocols, MESI, store buffers, invalidate queues, and memory barriers—that ensure correct data ordering and visibility across processors.

CPUCache CoherenceMESI
0 likes · 21 min read
Why CPU Cache Coherence Matters: From Volatile to MESI and Memory Barriers
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 25, 2022 · Backend Development

Why Caching Timestamps Can Slash CPU Usage in High‑QPS Java and Go Services

This article explores how naive timestamp retrieval can become a CPU bottleneck under high concurrency, demonstrates cache‑based optimizations used in Alibaba's Cobar and Sentinel projects, presents benchmark results, and proposes an adaptive algorithm to enable or disable caching based on real‑time QPS.

Javahigh QPStimestamp caching
0 likes · 11 min read
Why Caching Timestamps Can Slash CPU Usage in High‑QPS Java and Go Services
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 16, 2022 · Backend Development

The Schrodinger Fastjson Bug: Why Random Cast Errors Occur

A developer chronicles a perplexing Fastjson bug where identical JSON data intermittently triggers a 'can not cast to String' error, explains how generic type caching caused the issue, and shows how upgrading from version 1.2.29 to 1.2.33 resolves it.

Javabug investigationgeneric parsing
0 likes · 11 min read
The Schrodinger Fastjson Bug: Why Random Cast Errors Occur
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 10, 2022 · Backend Development

Why Java’s WatchService Misses File Changes and How to Fix It

An in‑depth look at a real‑world file‑watching failure caused by a JDK timestamp bug, exploring Java’s WatchService implementation, its reliance on polling versus Linux’s inotify, and practical workarounds to ensure reliable configuration reloads across platforms.

JDK bugJavaPolling
0 likes · 10 min read
Why Java’s WatchService Misses File Changes and How to Fix It
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 5, 2022 · Databases

How We Scaled a Ride‑Hailing Order System: From Single DB to Sharded MySQL

This article chronicles the step‑by‑step evolution of a ride‑hailing order service, detailing how a single SQLServer database was optimized, split by business domain, migrated to MySQL, and finally sharded with a custom client‑side component, while leveraging read/write separation, caching, MQ, and data‑exchange platforms to sustain massive traffic.

CachingMigrationdatabases
0 likes · 15 min read
How We Scaled a Ride‑Hailing Order System: From Single DB to Sharded MySQL
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Apr 7, 2022 · Fundamentals

How Reading Open‑Source Code Transformed My Development Career

The author recounts a decade‑long journey of reading open‑source Java frameworks—from Tomcat and Spring to Netty, Dubbo, and the Linux kernel—highlighting how systematic shortcut practice, debugging techniques, and focused inquiry transformed his development skills and offers guidance for others seeking a similar path.

Learning PathSoftware Engineeringsource code reading
0 likes · 12 min read
How Reading Open‑Source Code Transformed My Development Career