Sanyou's Java Diary
Author

Sanyou's Java Diary

Passionate about technology, though not great at solving problems; eager to share, never tire of learning!

207
Articles
0
Likes
506
Views
0
Comments
Recent Articles

Latest from Sanyou's Java Diary

100 recent articles max
Sanyou's Java Diary
Sanyou's Java Diary
Sep 22, 2025 · Backend Development

How to Build a Scalable Enterprise Unified Message Push System

This article explains why growing enterprises need a unified message‑push platform, outlines the core challenges such as multi‑channel integration, high concurrency, reliability, templating and extensibility, and then walks through a complete architecture design—including access, business, service and storage layers—to achieve a scalable, maintainable solution.

EnterpriseHigh ConcurrencyMessage Push
0 likes · 10 min read
How to Build a Scalable Enterprise Unified Message Push System
Sanyou's Java Diary
Sanyou's Java Diary
Aug 28, 2025 · Backend Development

Unlocking JDK 17: Key Features, ZGC Benefits, and Upgrade Strategies

This article explores JDK 17's major language enhancements, new APIs, and performance‑focused improvements such as ZGC, then details Meituan's security‑team migration experience, performance benchmarks, practical upgrade steps, and JVM tuning tips for a smooth transition from JDK 8 to JDK 17.

JDK 17Java performanceUpgrade process
0 likes · 28 min read
Unlocking JDK 17: Key Features, ZGC Benefits, and Upgrade Strategies
Sanyou's Java Diary
Sanyou's Java Diary
Aug 25, 2025 · Databases

Understanding MySQL Next-Key Locks: Preventing Phantom Reads and Deadlocks

This article explains MySQL InnoDB's Next-Key Lock mechanism, how it combines row and gap locks to prevent phantom reads under the REPEATABLE READ isolation level, illustrates lock ranges with examples, discusses when it degrades to row or gap locks, and highlights its advantages and potential deadlock risks.

DeadlockInnoDBMySQL
0 likes · 8 min read
Understanding MySQL Next-Key Locks: Preventing Phantom Reads and Deadlocks
Sanyou's Java Diary
Sanyou's Java Diary
Aug 14, 2025 · Databases

Deep Dive into MySQL InnoDB Tablespaces, Undo Logs, and Doublewrite Buffer

This article explores MySQL InnoDB's memory and on‑disk architecture, detailing tablespace types, table and row formats, primary key strategies, index structures, the doublewrite buffer, redo log, undo log, and temporary tablespaces, complete with diagrams and code examples for practical understanding.

Doublewrite BufferIndexesInnoDB
0 likes · 25 min read
Deep Dive into MySQL InnoDB Tablespaces, Undo Logs, and Doublewrite Buffer
Sanyou's Java Diary
Sanyou's Java Diary
Aug 7, 2025 · Backend Development

How Easy-Cache Solves Distributed Cache Pain Points with Multi-Level Design

This article introduces Easy-Cache, a Spring-AOP based caching framework that provides annotation-driven, multi-level Redis and local cache with dynamic upgrade/downgrade, elastic expiration, and Lua-script-ensured data consistency, eliminating repetitive cache code and handling failures, cache penetration, breakdown, and eventual consistency challenges.

CacheDistributed LockLua
0 likes · 18 min read
How Easy-Cache Solves Distributed Cache Pain Points with Multi-Level Design
Sanyou's Java Diary
Sanyou's Java Diary
Jul 31, 2025 · Databases

How MyBatis Interceptors Can Safeguard Your Java Service from Memory Overruns

This article explains how oversized database query results can cause JVM heap spikes, frequent Full GC, or OOM crashes in Java services, and demonstrates a non‑intrusive MyBatis interceptor solution that monitors, grades, and blocks risky queries while exposing Prometheus metrics for proactive alerting and capacity planning.

InterceptorJavaMyBatis
0 likes · 18 min read
How MyBatis Interceptors Can Safeguard Your Java Service from Memory Overruns
Sanyou's Java Diary
Sanyou's Java Diary
Jul 28, 2025 · Backend Development

Pick the Right Real‑Time Communication: Short Polling, Long Polling, WebSocket, SSE

This article compares four real‑time communication techniques—short polling, long polling, WebSocket, and Server‑Sent Events—detailing their protocols, advantages, disadvantages, latency, resource consumption, and typical use cases, and provides guidance on selecting the most suitable method for different application requirements.

Real-time communicationSSEbackend development
0 likes · 6 min read
Pick the Right Real‑Time Communication: Short Polling, Long Polling, WebSocket, SSE
Sanyou's Java Diary
Sanyou's Java Diary
Jul 24, 2025 · Backend Development

Why Upgrading to JDK 17 with ZGC Can Slash Costs and Boost Performance

This article explains how moving from Java 8 to JDK 17—leveraging new language features, updated APIs, and the ZGC garbage collector—can dramatically improve service latency, reduce GC pauses, lower machine costs, and enable AI SDKs that require Java 17, while also detailing migration steps and performance results.

GarbageCollectionJDK17JavaPerformance
0 likes · 31 min read
Why Upgrading to JDK 17 with ZGC Can Slash Costs and Boost Performance
Sanyou's Java Diary
Sanyou's Java Diary
Jul 17, 2025 · Backend Development

Unlocking RocketMQ 4.x: Deep Dive into Architecture, Protocols, and High‑Performance Messaging

This article provides a comprehensive technical overview of RocketMQ 4.x, covering its core roles, publish‑subscribe model, communication protocol, reactor thread model, storage files, high‑performance read/write techniques, consumption flow, deployment patterns, DLedger Raft integration, transaction and broadcast messaging, ordered message handling, architectural drawbacks, and the new stateless proxy architecture introduced in RocketMQ 5.0.

High PerformanceMessage QueueRocketMQ
0 likes · 22 min read
Unlocking RocketMQ 4.x: Deep Dive into Architecture, Protocols, and High‑Performance Messaging