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
Mar 28, 2024 · Backend Development

Why Lombok’s @Builder Drops Default Values and How to Fix It

This article walks through a real‑world NPE caused by Lombok’s @Builder ignoring field initializers, explains the underlying double‑initialisation bug, shows how @Builder.Default restores the defaults, and outlines Lombok’s compile‑time annotation processing mechanism.

Builder PatternCompile-time AnnotationDefault Values
0 likes · 15 min read
Why Lombok’s @Builder Drops Default Values and How to Fix It
Sanyou's Java Diary
Sanyou's Java Diary
Mar 14, 2024 · Backend Development

Mastering Order Auto‑Cancellation: Timers, Queues, and Distributed Schedulers

This article examines practical strategies for automatically canceling unpaid orders, comparing simple timer‑based polling, cluster‑ready schedulers like Quartz, Elastic‑Job, and XXL‑JOB, as well as delayed‑message approaches using RocketMQ and Redis, and offers best‑practice guidelines for concurrency, monitoring, and fault tolerance.

backend architecturedelayed messagesdistributed scheduler
0 likes · 16 min read
Mastering Order Auto‑Cancellation: Timers, Queues, and Distributed Schedulers
Sanyou's Java Diary
Sanyou's Java Diary
Mar 11, 2024 · Backend Development

Why RocketMQ Is So Fast: 10 Core Performance Techniques Explained

This article breaks down the ten key mechanisms—batch sending, message compression, Netty‑based networking, zero‑copy I/O, sequential writes, optimized storage structures, asynchronous flushing and replication, batch processing, lock refinements, and thread‑pool isolation—that together give RocketMQ its remarkable speed and efficiency.

Message QueueNettyPerformance
0 likes · 20 min read
Why RocketMQ Is So Fast: 10 Core Performance Techniques Explained
Sanyou's Java Diary
Sanyou's Java Diary
Mar 7, 2024 · Backend Development

Mastering Rate Limiting: Algorithms, Pros, Cons, and Distributed Solutions

This article explores why rate limiting is essential for high‑concurrency services, introduces four core algorithms with Go implementations, compares their strengths and weaknesses, and presents practical distributed limiting strategies using Redis, load balancers, and coordination services.

Golangalgorithmmicroservices
0 likes · 30 min read
Mastering Rate Limiting: Algorithms, Pros, Cons, and Distributed Solutions
Sanyou's Java Diary
Sanyou's Java Diary
Mar 4, 2024 · Fundamentals

Master JVM Memory Troubleshooting: A Complete Step‑by‑Step Guide

This comprehensive guide presents a systematic, step‑by‑step process for diagnosing JVM memory problems—including heap, Metaspace, DirectMemory, JNI memory, and stack issues—using Alibaba Cloud ARMS, ATP, standard JDK tools, and best‑practice commands to quickly locate root causes and apply effective solutions.

HeapJVMMemory
0 likes · 56 min read
Master JVM Memory Troubleshooting: A Complete Step‑by‑Step Guide
Sanyou's Java Diary
Sanyou's Java Diary
Feb 22, 2024 · Backend Development

10 Proven Techniques to Supercharge Backend API Performance

This article presents a comprehensive guide for backend developers, covering ten practical techniques—including local and distributed caching, parallel execution, asynchronous processing, connection pooling, sharding, SQL tuning, pre‑computation, batch operations, lock granularity, and context propagation—to dramatically improve API performance.

SQL Tuningbackendcaching
0 likes · 13 min read
10 Proven Techniques to Supercharge Backend API Performance
Sanyou's Java Diary
Sanyou's Java Diary
Feb 5, 2024 · Information Security

Master the Top 5 Encryption Algorithms: MD5, SHA-256, DES, AES, RSA Explained

This article introduces the five most common encryption algorithms—MD5, SHA‑256, DES, AES, and RSA—explaining their classifications, security properties, typical use cases, and providing complete Java implementations for each, while also showing how they underpin HTTPS security.

Encryptionasymmetric encryptionhash algorithms
0 likes · 18 min read
Master the Top 5 Encryption Algorithms: MD5, SHA-256, DES, AES, RSA Explained
Sanyou's Java Diary
Sanyou's Java Diary
Feb 1, 2024 · Backend Development

Message Queues Unveiled: From Decoupling to Platformization and Core Architectures

This article traces the two‑decade evolution of message queues—from early decoupling solutions like ActiveMQ, through high‑throughput designs such as Kafka, to modern platformized systems like RocketMQ and Pulsar—while explaining fundamental concepts, partitioning, and storage architectures that underpin today’s distributed messaging platforms.

KafkaMessage QueuePulsar
0 likes · 17 min read
Message Queues Unveiled: From Decoupling to Platformization and Core Architectures
Sanyou's Java Diary
Sanyou's Java Diary
Jan 23, 2024 · Fundamentals

Demystifying Raft: How Nacos Uses JRaft for Strong Consistency

This article explains the Raft consensus algorithm, its request lifecycle, leader election, snapshot mechanism, and JRaft optimizations such as linear reads, learners, and multi‑raft groups, illustrating how Nacos integrates these concepts to achieve reliable distributed consistency.

JRaftNacosRaft
0 likes · 23 min read
Demystifying Raft: How Nacos Uses JRaft for Strong Consistency