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
Jun 11, 2024 · Cloud Native

Mastering Microservices: From Monolith to Scalable Cloud‑Native Architecture

This comprehensive guide explains what microservices are, why they evolved from monolithic applications, the challenges they introduce, popular open‑source solutions such as Dubbo, Spring Cloud Netflix and Spring Cloud Alibaba, and essential components like service registries, configuration centers, remote‑call mechanisms, load‑balancing, circuit‑breakers, tracing, and monitoring for building resilient cloud‑native systems.

Configurationcircuit-breakercloud-native
0 likes · 44 min read
Mastering Microservices: From Monolith to Scalable Cloud‑Native Architecture
Sanyou's Java Diary
Sanyou's Java Diary
Jun 3, 2024 · Backend Development

Understanding the Full Lifecycle of a RocketMQ Message: From Production to Deletion

This article walks through every stage of a RocketMQ message—from producer creation, routing, queue selection, and storage with zero‑copy techniques, through high‑availability replication, consumption modes, ordering guarantees, and finally automatic cleanup—providing code examples and architectural diagrams for each step.

RocketMQZero-Copybackend development
0 likes · 26 min read
Understanding the Full Lifecycle of a RocketMQ Message: From Production to Deletion
Sanyou's Java Diary
Sanyou's Java Diary
May 13, 2024 · Backend Development

Mastering Idempotent Design: 8 Proven Strategies for Reliable APIs

This article explains the concept of idempotence, why it matters in distributed systems, how to handle timeout scenarios, design principles using globally unique IDs, and eight practical implementation patterns—including database tricks, token schemes, locking, and HTTP method considerations—to build robust, repeat‑safe APIs.

HTTPIdempotencebackend
0 likes · 21 min read
Mastering Idempotent Design: 8 Proven Strategies for Reliable APIs
Sanyou's Java Diary
Sanyou's Java Diary
May 9, 2024 · Databases

From Single Node to Cluster: Mastering Redis Architecture Evolution

This article walks you through Redis’s architectural journey—from a simple single‑node setup, through persistence mechanisms, master‑slave replication, Sentinel‑driven automatic failover, and finally sharding with Redis Cluster—explaining each component’s purpose, trade‑offs, and how they collectively boost performance and reliability.

ClusterPersistenceRedis
0 likes · 18 min read
From Single Node to Cluster: Mastering Redis Architecture Evolution
Sanyou's Java Diary
Sanyou's Java Diary
May 6, 2024 · Backend Development

Mastering Global ID Generation: From MySQL Auto‑Increment to Snowflake & Leaf

This article compares common global ID generation strategies for microservice architectures, covering database‑level solutions like auto‑increment configuration and MyCat + ZooKeeper, as well as application‑level approaches such as UUID, Snowflake, Leaf (segment and Snowflake modes), Redis, and ZooKeeper, with configuration steps, code samples, and pros‑cons.

JavaLeafSnowflake
0 likes · 16 min read
Mastering Global ID Generation: From MySQL Auto‑Increment to Snowflake & Leaf
Sanyou's Java Diary
Sanyou's Java Diary
Apr 30, 2024 · Fundamentals

Mastering Architecture Diagrams: When, Why, and How to Build Clear System Blueprints

This comprehensive guide explains the purpose of architecture diagrams, the criteria for good diagrams, the optimal moments to create them, and detailed methods for drawing business, application, technical, code, and data architecture diagrams, complete with design principles, classification, and practical tips.

Code ArchitectureData ModelingTechnical architecture
0 likes · 21 min read
Mastering Architecture Diagrams: When, Why, and How to Build Clear System Blueprints
Sanyou's Java Diary
Sanyou's Java Diary
Apr 22, 2024 · Backend Development

Master Spring’s Core: Resource Management, Environment, Type Conversion, and More

Explore a comprehensive guide to Spring’s core mechanisms—including resource handling, environment configuration, type conversion, data binding, generic processing, internationalization, BeanFactory, ApplicationContext, and event publishing—complete with detailed explanations, code demos, diagrams, and practical insights for mastering backend development with Spring.

ApplicationContextData BindingEvent Publishing
0 likes · 40 min read
Master Spring’s Core: Resource Management, Environment, Type Conversion, and More
Sanyou's Java Diary
Sanyou's Java Diary
Apr 15, 2024 · Databases

30 Proven SQL Optimization Tips to Boost Query Performance

This article presents thirty practical SQL optimization techniques, ranging from avoiding SELECT * and using LIMIT 1 to proper indexing, join strategies, and query rewriting, each illustrated with code examples and clear explanations to help developers write faster, more efficient database queries.

IndexingPerformanceQuery Tuning
0 likes · 28 min read
30 Proven SQL Optimization Tips to Boost Query Performance
Sanyou's Java Diary
Sanyou's Java Diary
Apr 8, 2024 · Fundamentals

What Are the 7 Core Garbage Collection Algorithms and When to Use Them?

This article explains why garbage collection (GC) is essential, defines key GC terminology, compares performance metrics, and provides a detailed overview of seven common GC algorithms—including mark‑sweep, reference counting, copying, mark‑compact, conservative, generational, and incremental GC—along with their advantages, disadvantages, and typical improvements.

GC Algorithmsmemory managementsoftware fundamentals
0 likes · 47 min read
What Are the 7 Core Garbage Collection Algorithms and When to Use Them?
Sanyou's Java Diary
Sanyou's Java Diary
Apr 1, 2024 · Backend Development

7 Real-World Message Queue Patterns Every Backend Engineer Should Know

This article shares seven classic use cases of message queues—including asynchronous decoupling, traffic smoothing, bus architecture, delayed tasks, broadcast consumption, distributed transactions, and data hub integration—illustrated with real-world experiences and code examples to help engineers design robust high‑concurrency systems.

Broadcast ConsumptionKafkaRocketMQ
0 likes · 12 min read
7 Real-World Message Queue Patterns Every Backend Engineer Should Know