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
Nov 25, 2024 · Cloud Native

Designing Resilient Stateful Distributed Systems: From Theory to Microservice Architecture

This article explores the fundamentals of distributed systems, compares stateful and stateless services, examines monolithic, SOA, and microservice models, and provides practical guidance on access layers, fault tolerance, service discovery, scaling, and data storage for building robust cloud‑native architectures.

cloud-nativefault tolerancemicroservices
0 likes · 29 min read
Designing Resilient Stateful Distributed Systems: From Theory to Microservice Architecture
Sanyou's Java Diary
Sanyou's Java Diary
Nov 11, 2024 · Backend Development

Mastering Distributed Transactions: From 2PC to Seata AT Mode

This article explains the fundamentals of ACID transactions, the challenges of multi‑data‑source operations, surveys common distributed‑transaction solutions such as 2PC, 3PC, TCC, transaction‑status tables and message‑queue based eventual consistency, and then details the implementation of Seata’s AT mode in a micro‑service e‑commerce scenario.

2PCAT modeSeata
0 likes · 31 min read
Mastering Distributed Transactions: From 2PC to Seata AT Mode
Sanyou's Java Diary
Sanyou's Java Diary
Oct 28, 2024 · Fundamentals

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

This comprehensive guide walks you through systematic JVM memory issue diagnosis, covering initial data collection, analysis of heap, metaspace, direct memory, stack problems, and practical command‑line tools, while offering actionable tips and real‑world examples for effective troubleshooting.

DirectMemoryHeapJVM
0 likes · 56 min read
Master JVM Memory Troubleshooting: A Step‑by‑Step Guide
Sanyou's Java Diary
Sanyou's Java Diary
Oct 14, 2024 · Fundamentals

Unlocking Java’s AQS: How AbstractQueuedSynchronizer Powers Locks and Synchronizers

This article explains Java's AbstractQueuedSynchronizer (AQS) framework, detailing its FIFO queue, state handling, entry‑wait queue, exclusive and shared lock acquisition, condition‑variable queues, and how core concurrency utilities like ReentrantLock, ReadWriteLock, CountDownLatch, Semaphore, and ThreadPoolExecutor are built on it.

AQSConcurrencyLocks
0 likes · 31 min read
Unlocking Java’s AQS: How AbstractQueuedSynchronizer Powers Locks and Synchronizers
Sanyou's Java Diary
Sanyou's Java Diary
Oct 10, 2024 · Big Data

Why Kafka Handles Millions of Messages Per Second: Inside Its High‑Performance Architecture

This article explains how Kafka achieves ultra‑high throughput and low latency despite being disk‑based, covering its Reactor I/O network model, zero‑copy techniques, partitioning strategies, segment logs with sparse indexes, sequential disk writes, page cache usage, compression, batch processing, and lock‑free offset management.

KafkaOffset ManagementPerformance
0 likes · 27 min read
Why Kafka Handles Millions of Messages Per Second: Inside Its High‑Performance Architecture
Sanyou's Java Diary
Sanyou's Java Diary
Sep 26, 2024 · Fundamentals

Mastering Java volatile: Visibility, Atomicity, and Memory Model Explained

This article provides a comprehensive guide to Java's volatile keyword, covering its pronunciation, core features such as visibility, lack of atomicity, and instruction reordering prevention, the Java Memory Model, cache‑coherence mechanisms, practical code examples, and best‑practice scenarios like double‑checked locking and when to prefer volatile over heavier synchronization constructs.

JMMmemory modelmultithreading
0 likes · 21 min read
Mastering Java volatile: Visibility, Atomicity, and Memory Model Explained
Sanyou's Java Diary
Sanyou's Java Diary
Sep 19, 2024 · Operations

Message Queue Showdown: Choosing Kafka, Pulsar, RabbitMQ, RocketMQ or NSQ

This comprehensive guide compares five popular message queue systems—Kafka, Pulsar, RabbitMQ, RocketMQ, and NSQ—covering their architectures, core concepts, selection criteria, feature differences such as ordering, latency, durability, scaling, and operational considerations, to help engineers select the most suitable solution for their use cases.

ComparisonKafkaMessage Queue
0 likes · 46 min read
Message Queue Showdown: Choosing Kafka, Pulsar, RabbitMQ, RocketMQ or NSQ
Sanyou's Java Diary
Sanyou's Java Diary
Sep 9, 2024 · Databases

Master MySQL Indexes: B+Tree, Hash, Clustering & Optimization

This article provides a comprehensive guide to MySQL indexing, covering index types, data structures, clustering and non‑clustering indexes, hash indexes, B+Tree mechanics, index lookup, covering indexes, index push‑down, index merge, cost‑based index selection, common pitfalls, and best practices for designing effective indexes.

MySQLOptimizationPerformance
0 likes · 34 min read
Master MySQL Indexes: B+Tree, Hash, Clustering & Optimization
Sanyou's Java Diary
Sanyou's Java Diary
Aug 15, 2024 · Backend Development

9 Proven Techniques to Supercharge Backend Service Performance

This article outlines nine practical methods—caching, parallel processing, batch handling, data compression, lock‑free design, sharding, request avoidance, pooling, and asynchronous processing—illustrated with Redis, MySQL, Go, and Kafka examples, showing how they collectively cut latency and improve throughput.

backendcaching
0 likes · 29 min read
9 Proven Techniques to Supercharge Backend Service Performance