Tag: Java

243 articles

Deploying Spring Boot on K8s: 5 Pitfalls I Encountered

Documenting real issues encountered when migrating Spring Boot microservices to Kubernetes: health checks, ConfigMap hot-reload, JVM memory, graceful shutdown...

Spring Cloud Gateway Rate Limiting and Circuit Breaker Practice

Recording the complete process of configuring Spring Cloud Gateway rate limiting (Redis token bucket) and circuit breaker (Resilience4j) in production, including pitfalls...

RocketMQ Java API: Sync/Async Producer

Complete RocketMQ Java API tutorial, sync/async message producer (Producer), pull consumer (PullConsumer) and push consumer (PushConsumer) code examples.

RabbitMQ JMS Mode: Queue/Topic, 6 Message Types and Object Model

Java systems doing async decoupling and event-driven need unified understanding of JMS message model, object model and message types.

JMS Queue/Topic Cluster: Avoiding Duplicate Consumption

JMS Topic broadcasts in application cluster, causing same business to be repeatedly consumed by multiple nodes.

MQ Application: Cache Warm-up, Rate Limiting, Redis Lua and Traffic Peak Shaving

E-commerce seckill/ticket-grabbing scenarios with instantaneous traffic peaks, high read/write concurrency. Use pre-static + rate limiting queuing

Build MQ Prototype with BlockingQueue: Producer-Consumer Gap

Implement a minimal runnable message model with queue buffering and async decoupling using Java concurrency.

MQ Selection: RabbitMQ vs RocketMQ vs Kafka

Coexisting with traditional IBM MQ, need open source, operatable, scalable, consistency/reliability.

Spymemcached Deep Dive: Thread Model, Sharding and Serialization

Java service integrating with Memcached needs to understand Spymemcached's thread model, sharding routing and serialization details.

EVCache Client Integration: Memcached Setup and Configuration

Java applications wanting to experience Netflix EVCache locally or in small teams, but server not open source, can only self-build based on Memcached.

EVCache Internal Principles: Memcached Architecture, Slab and Eviction

Using EVCache in large-scale distributed cache needs understanding of underlying Memcached memory management and eviction behavior.

Guava Cache Source Analysis: LocalCache, Segment and LoadingCache

Guava Cache is widely used in production, but many lack source-level understanding of LocalCache/Segment/LoadingCache behavior.

EVCache Introduction: Netflix-level Architecture and Multi-Region Cache

Want to learn Netflix's EVCache system for self-development, but only know it's 'Memcached-based distributed cache'.

Guava Cache: concurrencyLevel and refreshAfterWrite in Practice

Deep dive into concurrencyLevel, refreshAfterWrite and LoadingCache dynamic loading behavior, with horizontal comparison with custom LinkedHashMap LRU implementation.

Guava Cache Troubleshooting: OOM, Expiration and Hit Rate Issues

Using Guava Cache for local caching in Java projects, troubleshooting and fixing production issues like OOM, abnormal hit rate, thread blocking and performance regression.

Guava Cache: Deletion Strategy, Expiration and Common Pitfalls

Guava Cache uses 'lazy cleanup + LRU+FIFO' strategy. Passive deletion and active deletion need to be used together. Deep dive into expireAfterAccess, expireAfterWrite and...

Guava Cache: From ConcurrentHashMap to LocalCache Structure

Deep dive into LocalCache, Guava Cache's core implementation class, covering segmented lock design, five queue mechanism, eviction strategy and lazy cleanup principles.

Cache Practice: Local vs Distributed (Guava/Redis 7.2)

High concurrency read-heavy business, database can't handle it, need to improve throughput and stability.

OSS Access Control: ACL, RAM, Bucket Policy and Troubleshooting

For multi-team and cross-account collaboration, OSS needs public access, least privilege, and auditability.

AI Research #134: Java 2025 - Will It Decline?

In 2025, Java remains the enterprise backend and critical industry workhorse.

OSS Practice Guide: Bucket/External Links/Hotlink Protection

Enterprises and individuals migrating images/audio/video/static resources to Aliyun OSS need stable operations and cost control.

AI Research #133: Java vs Kotlin/Go/Rust/Python/Node 2025

Comprehensive comparison of Java 21/23 (Virtual Threads/Loom) with Kotlin 2.x, Go 1.22/1.23, Rust 1.7x, Python (PyTorch 2.x/TensorFlow 2.x), Node.js 20/22.

Java Integration with FastDFS: Client and Maven/Spring Boot

Two ways for Java applications to integrate with FastDFS: official source compilation (happyfish100/fastdfs-client-java 1.37-SNAPSHOT) and Maven dependency (cn.

AI Research #132: Java Ecosystem 2025 - Spring, Quarkus, Micronaut and AOT Trends

Spring Framework 6, Spring Boot 3.x, GraalVM Native Image, Quarkus, Micronaut, and AOT trends shaping the Java ecosystem in 2025.

FastDFS High Concurrency Optimization: max_connections, Trunk Files and nofile

Scenario: High concurrency / massive small files (trunk) / single disk or RAID Conclusion: Upgrade to v5.04+, increase max_connections and align with nofile

AI Research #131: Java 17/21/25 Complete Comparison

Java 17 (2021), Java 21 (2023), Java 25 (2025) language and JVM changes, covering Virtual Threads (Project Loom), Records/Pattern Matching (Project Amber).

FastDFS Cluster Practice: 3-Node Tracker/Storage + Nginx

Deploy tracker, storage, and Nginx on three hosts with round-robin upload. Key points: Nginx+mod_fastdfs routing and monitoring verification.

MySQL Database Sharding: Vertical vs Horizontal Partitioning

Database sharding explained: vertical partitioning, horizontal partitioning, vertical sharding, vertical table splitting, horizontal table splitting.

MySQL MHA Master-Slave Failover: High Availability Solution

MHA high availability solution: Manager, Node, fault handling, failover.

MySQL Read-Write Separation: Principles and Implementation

Read-write separation principles, implementation methods, master-slave lag solutions, database middleware.

MySQL Transaction Control: Lost Update, Locking and MVCC

Concurrent transaction problems: lost update, dirty read, non-repeatable read, phantom read, lock mechanism: shared lock, exclusive lock, MVCC.

MySQL Transaction and Lock Mechanism: ACID Properties

ACID properties: atomicity, consistency, isolation, durability, WAL mechanism.

MySQL Slow Query Analysis and Optimization Guide

Slow query log, mysqldumpslow, EXPLAIN analysis, common optimization solutions.

MySQL Index and Sorting: Filesort and Index Sort

filesort sorting, index sorting, two-pass sorting, single-pass sorting, clustered index and secondary index sorting.

MySQL Index Optimization: Table Lookup, Covering Index, Leftmost Prefix and LIKE

Table lookup queries, covering index, leftmost prefix principle, LIKE queries, NULL value handling.

MySQL EXPLAIN: Index Analysis and Query Optimization

EXPLAIN command: selecttype, type, possiblekeys, key, rows, key_len, Extra.

MySQL Clustered vs Secondary Index: Structure, Principle and Performance Deep Dive

Clustered index (secondary index, primary key index), secondary index, table lookup query, covering index.

MySQL Index Principles: B+Tree, Hash, Binary Search

Index principles: B+Tree, Hash index, binary search, InnoDB adaptive hash index.

MySQL Index Types: BTree, Hash, FULLTEXT, RTree Explained

Index types: BTree, Hash, FULLTEXT, RTree, regular index, unique index, primary key index, composite index, clustered index.

MySQL Binlog: Recording Modes, Replication, Data Recovery

Binlog three recording modes: STATEMENT, ROW, MIXED, file format, write mechanism, master-slave replication.

MySQL Undo/Redo Log: Transaction Rollback and Persistence

Undo Log for rollback, Redo Log for redo, transaction atomicity, durability, MVCC.

MySQL InnoDB Storage Structure: Tablespace, Segment, Extent, Page and Row Format Deep Dive

InnoDB storage structure: Tablespace, Segment, Extent, Page, Row. Row formats: REDUNDANT, COMPACT, DYNAMIC, COMPRESSED

MySQL Architecture to Threads: Storage Engine and Thread Model Deep Dive

MySQL 5.7/8.0 storage engine optimization, InnoDB thread model: IO Thread, Purge Thread, Page Cleaner Thread, Master Thread

MySQL InnoDB Disk Structure: Tablespace, Log System and Data Dictionary Deep Dive

InnoDB disk structure: system tablespace, file-per-table tablespace, general tablespace, temporary tablespace, Doublewrite Buffer, Redo Log, Undo Log - complete storage a...

MySQL InnoDB Storage Structure: Buffer Pool, Write Buffer and Log Mechanism Deep Dive

InnoDB memory structure: Buffer Pool, Change Buffer, Adaptive Hash Index, Log Buffer

MySQL Storage Engines: InnoDB vs MyISAM Deep Comparison

MySQL storage engine comparison: InnoDB, MyISAM, Memory, Archive - transactions, locking mechanisms, index structures.

MySQL Connection, Thread, Query Cache and Optimizer Deep Dive

MySQL connection mechanism, half-duplex communication, query cache, query optimizer explained.

MySQL Internal Architecture: Service Layer, Storage Engine and File System Coverage

MySQL four-layer architecture: network connection layer, service layer, storage engine layer, system file layer.

MySQL Evolution: From Standalone to Cloud Database

MySQL development history, main branches, architecture evolution (standalone -> master-slave -> sharding -> cloud database).

Distributed Services: Consistency Models, Strong/Weak/Monotonic/Eventual Consistency

In-depth analysis of distributed services covering distributed consistency including strong consistency, weak consistency, monotonic read consistency, and eventual consis...

Distributed Services ACID: Three-Phase Commit 3PC vs 2PC

This article provides an in-depth analysis of the Three-Phase Commit protocol (3PC) and its differences from Two-Phase Commit (2PC) in distributed transaction processing.

Distributed Services ACID: Two-Phase Commit 2PC Protocol

This article provides an in-depth analysis of the Two-Phase Commit protocol (2PC) for distributed transactions, covering ACID properties and practical implementation.

Distributed Services: Paxos Algorithm Optimization and Liveness

This article provides an in-depth analysis of the Paxos distributed consensus algorithm, covering algorithm optimization and how to guarantee liveness properties.

Distributed Services: CAP Theorem AP vs CP Trade-offs

This article provides an in-depth analysis of the CAP theorem in distributed systems, explaining Consistency, Availability, and Partition Tolerance trade-offs.

Distributed Services: Paxos Algorithm - The Gold Standard

This article provides an in-depth analysis of the Paxos distributed consensus algorithm, explaining Proposal and Acceptor roles with detailed derivation process.

Distributed Services: RPC and RMI Java Implementation

This article provides an in-depth analysis of RPC and RMI network communication in distributed systems, with practical Java code implementations.

Distributed Services: BIO NIO AIO with Code Examples

This article provides a detailed analysis of BIO, NIO, and AIO network I/O models in distributed systems, with practical Java code examples.

Distributed Services: Heartbeat Detection and High Availability

This article provides an in-depth analysis of heartbeat detection mechanisms and high availability design principles in distributed systems.

Distributed Services: Raft Consensus Algorithm Illustrated

This article provides a comprehensive explanation of the Raft distributed consensus algorithm, covering leader election, log replication, and safety mechanisms.

Distributed Services: Network Communication RPC and RMI

This article provides an in-depth analysis of RPC and RMI communication technologies in distributed systems, covering principles, architecture, and implementations.

Distributed Services: Custom RPC Implementation with Netty

This article provides a detailed guide to implementing a custom RPC framework using Netty, with complete code examples for provider and consumer.

RPC Dubbo: A Comprehensive Introduction and Getting Started

This article provides a comprehensive introduction to Apache Dubbo RPC framework, covering core features, service governance, and getting started guide.

Distributed Services: Netty Server and Client Implementation

This article provides a practical guide to implementing Netty-based server and client applications with detailed Java code examples.

Distributed Services: Netty EventLoop Deep Dive

This article provides an in-depth analysis of Netty's EventLoop mechanism, thread model, and core components for building high-performance network applications.

RPC Architecture Evolution: Monolith to Microservices

This article provides an in-depth analysis of software architecture evolution from monolithic to distributed to microservices architectures, covering RPC fundamentals.

RPC Dubbo Admin: Installation and Source Code Compilation

This article provides a comprehensive guide to Dubbo Admin visual management platform, covering installation methods, source code compilation, and Docker deployment.

RPC Dubbo: Consumer Module and Main Program

This article provides a detailed guide to the Dubbo consumer module, covering configuration to proxy generation, with practical code examples.

RPC Dubbo: Producer Module Deep Dive

This article provides a detailed explanation of the Dubbo producer module, covering key components, startup flow, and production environment best practices.

RPC Dubbo: Java SPI Mechanism from JDK to Dubbo

This article provides an in-depth analysis of Java SPI mechanism, explaining the evolution from JDK SPI to Dubbo's plugin-based extension system.

RPC Dubbo: Parent Project Configuration Guide

This article provides a guide to setting up Dubbo parent project configuration with detailed POM and code examples for multi-module Maven projects.

RPC Dubbo: Adaptive and Filter Interceptor Mechanism

This article provides a comprehensive analysis of Dubbo's Adaptive and Filter interceptor mechanisms for dynamic extension and service chain enhancement.

RPC Dubbo: Load Balancing Complete Analysis

Comprehensive analysis of Dubbo load balancing strategies, configuration methods, and custom implementation guide covering Random, RoundRobin, LeastActive...

RPC Dubbo: Load Balancing and Async Implementation

This article provides a comprehensive analysis of Dubbo load balancing strategies and asynchronous call implementation with practical examples.

RPC Dubbo: Dynamic Routing Architecture Deep Dive

This article provides an in-depth analysis of Dubbo's dynamic routing architecture, from rule design to production system integration.

Distributed Services: Basic Concepts, Clusters, Communication and Three States

In-depth guide to distributed services covering basic concepts, cluster comparison, common patterns, communication methods, and detailed explanation of three states.

Tomcat Performance Optimization JVM Memory Model GC

In-depth guide to Tomcat performance optimization covering JVM memory model, garbage collection GC, and Tomcat configuration optimization with practical examples.

Tomcat SSL Working Principle Performance Optimization JVM

In-depth guide to Tomcat covering SSL working principle, performance optimization, parameter configuration, and JVM optimization with practical examples.

Tomcat Class Loading Mechanism: Parent Delegation, Lifecycle and Plugin Architecture

In-depth analysis of Tomcat class loading mechanism covering parent delegation model, lifecycle, and plugin architecture with detailed explanations.

Handwritten Tomcat Implementation Part 3: StaticResourceUtil, Servlet and Startup Testing

Step-by-step guide to implementing MiniCat part 3 covering startup testing, StaticResourceUtil, and Servlet implementation with complete code examples.

Handwritten Tomcat Implementation Part 2: HttpServlet, Request and RequestProcessor

Step-by-step guide to implementing MiniCat part 2 covering HttpServlet, Request, RequestProcessor components with detailed implementation code.

Handwritten Tomcat Implementation Part 1 MiniCat Bootstrap

Step-by-step guide to implementing a Mini Tomcat called MiniCat covering Bootstrap, Socket server, Request/Response handling with practical code examples.

Tomcat Core Architecture Configuration: Server, Service, Executor and Engine

In-depth analysis of Tomcat core architecture covering detailed configuration of main tags including Server, Service, Executor, Engine with practical examples.

Tomcat Core Architecture: Catalina Container, Startup Flow and Threading Mechanism

In-depth analysis of Tomcat core architecture covering Catalina container full analysis, startup flow, and threading mechanism with comprehensive explanations.

Spring In-Depth: Tomcat Core Architecture, Coyote IO Model and Protocol

In-depth analysis of Tomcat core architecture and processing flow covering Coyote IO model and protocol with comprehensive explanations.

Spring In-Depth: Nginx Process Mechanism, Master-Worker Coordination and Common Commands

In-depth analysis of Nginx underlying process mechanism covering Master Worker mechanism principles and commonly used commands with practical examples.

Spring In-Depth: Nginx Basic Config, Events/HTTP, Reverse Proxy and Load Balancing

In-depth guide to Nginx configuration covering nginx.conf structure, Events block, HTTP block, reverse proxy, and load balancing with practical examples.

Spring In-Depth: Nginx Introduction, History, Scenarios and Quick Start

In-depth introduction to Nginx covering its origins, development history, common scenarios, and quick configuration guide with practical examples.

Spring In-Depth: Declarative Transaction Support, XML and XML+Annotation Modes

In-depth guide to Spring declarative transaction support covering transaction configuration with XML mode and XML+annotation mode with practical examples.

Spring In-Depth: AOP Aspect Enhancement Core Concepts, Advice Types and XML + Annotation

In-depth introduction to Spring AOP aspect enhancement covering core concepts, advice types, XML+annotation approaches with code examples

Spring In-Depth: Declarative Transaction Support, Transaction Control and Isolation Levels

In-depth introduction to Spring declarative transaction support covering transaction control, concepts, four characteristics, and isolation levels with practical examples.

Spring In-Depth: AOP Aspect Enhancement Core Concepts, Terminology and Proxy Configuration

In-depth introduction to Spring AOP aspect enhancement covering core concepts, related terminology, and proxy configuration with practical examples.

Spring In-Depth: IoC Container Circular Dependency, Prototype Scope and Lazy ObjectFactory

In-depth analysis of Spring IoC container system covering circular dependency, prototype beans, prototype scope, and lazy ObjectFactory with solutions.

Spring In-Depth: IoC Container System BeanFactory Analysis and Lazy-Init

In-depth analysis of Spring IoC container system covering BeanFactory process analysis and Bean lazy loading mechanism with practical examples.

IoC Container Source Code Analysis: Bean Instantiation and Initialization Flow

In-depth analysis of Spring IoC container initialization flow through breakpoint debugging, detailed explanation of Bean creation timing and AbstractApplicationContext.

IoC Container System: Bean Lifecycle and PostProcessor Details

Detailed explanation of Spring IoC container architecture, complete Bean lifecycle, and execution timing of BeanPostProcessor and BeanFactoryPostProcessor.

FactoryBean and BeanFactory Details and BeanPostProcessor

In-depth explanation of the differences between FactoryBean and BeanFactory in Spring, lazy loading mechanism of beans, and usage of BeanPostProcessor and BeanFactoryPost...

IoC Basics: Pure Annotation Mode and SpringConfig Configuration

Detailed introduction to Spring pure annotation configuration including usage of @Configuration, @ComponentScan, @Bean, @PropertySource annotations and Web environment co...

IoC Basics: XML and Annotation Combined Configuration

Explaining Spring's XML and annotation combined configuration mode, including the correspondence between annotations and XML tags, and usage of dependency injection annot...

IoC Basics: Pure XML Startup and Bean, DI Injection Details

Detailed explanation of Spring IoC configuration in pure XML mode including three ways to create Beans, lifecycle, scope, and XML configuration for constructor injection...

IoC Basics: Summary of Ways to Start an IoC Container

"BeanFactory is the top-level interface of the Spring framework's IoC container.

Implementing Simple IoC-04: Manual AOP and Transaction Control

Manually implement AOP aspect-oriented programming on top of business logic, using JDK dynamic proxies and CGLIB to implement transaction manager for automatic commit and...

Implementing Simple IoC-03: Manually Implementing an IoC Container

Step-by-step guide to manually implement an IoC container using BeanFactory and XML configuration to manage Bean dependencies and complete core dependency injection imple...

FastDFS Architecture: Lightweight Tracker and Upload Principles

FastDFS architecture design: lightweight Tracker, peer storage structure, file upload and sync principles. This article analyzes principles and practices to help readers...

Implementing Simple IoC-02: Implementing Business Without Spring

Manually implement business logic layering without using Spring, including DAO layer, Service layer, and Controller layer, demonstrating dependency management issues in t...

Implementing Simple IoC-01: Servlet Introduction and Basic Principles

Step-by-step guide to implementing a simple Spring IoC container, Part 1 covering Servlet basics, characteristics, working principles, and writing your first Servlet prog...

FastDFS Architecture: Storage/Tracker/Group Design

FastDFS core architecture deep dive: Tracker Server, Storage Server, Group mechanism. This article analyzes principles and practices to help readers master key technical...

Spring Overview: History and Core Concepts IoC, AOP

Comprehensive introduction to Spring framework basics, evolution from EJB to Spring, detailed explanation of Spring's core concepts including IoC and AOP with practical i...

Handwritten ORM Framework 4: Framework Optimization and DefaultSqlSession Proxy Implementation

Optimize handwritten ORM framework, focusing on getMapper method implementation in DefaultSqlSession, using JDK dynamic proxy to create Mapper interface proxy objects.

FastDFS 6.15.0 + Nginx Dynamic Module: Source Compile to Access Link

Complete guide for FastDFS 6.15.0 source compilation and Nginx fastdfs-nginx-module configuration. This article analyzes principles and practices to help readers master k...

Handwritten ORM Framework 3: SqlSession and Executor Working Principles

In-depth analysis of SqlSession and Executor working principles in handwritten ORM framework, detailing implementation mechanisms of SqlSessionFactoryBuilder...

Handwritten ORM Framework 2: Resources, MappedStatement, and XMLBuilder Implementation

In the current project, create under resources: sqlMapConfig.xml mapper.xml

FastDFS: From Standalone to Distributed File Storage

FastDFS distributed file system architecture, evolution from standalone to distributed. This article analyzes principles and practices to help readers master key technica...

Handwritten ORM Framework 1 - JDBC Problems and Solutions

First article in the handwritten ORM framework series, introducing problems and disadvantages of traditional JDBC development and ORM framework design ideas and solutions.

MyBatis Design Patterns - Proxy Pattern and Source Code Analysis

Proxy Pattern: Provides a proxy for an object and controls access to the original object through the proxy. The English name of proxy pattern is Proxy.

Neo4j + Spring Boot Practice: Integration from Driver to Repository

Complete guide to integrating Spring Boot with Neo4j: Java Driver, Neo4jTemplate, Repository pattern with practical examples for graph database CRUD operations and relati...

MyBatis Design Patterns - Builder Pattern, Factory Pattern and Source Code Analysis

Detailed introduction to design patterns used in MyBatis source code including builder pattern, factory method pattern, singleton pattern, proxy pattern...

Neo4j Access Modes: Embedded vs Server with Java Examples

Neo4j embedded database vs server mode comparison, Java API access examples.

Neo4j Backup/Recovery + Warm-up and Execution Plan Practice

Neo4j database backup and recovery, data warm-up and execution plan analysis.

Neo4j Transaction, Index and Constraint Practice: Syntax, Concurrency and Troubleshooting

Neo4j transaction handling, index creation, constraint settings and concurrency issue troubleshooting.

MyBatis Annotation Development - One-to-Many and Many-to-Many Mapping

The relationship between user table and order table: one user has multiple orders, one order belongs to one user.

MyBatis Annotation Development - Basic Introduction and One-to-One Mapping

Detailed introduction to MyBatis annotation development approach, including usage of common annotations (@Select, @Insert, @Update, @Delete, @Results, etc.

Neo4j CQL Quick Reference: String, Aggregate, Relationship Functions and Paths

Neo4j CQL functions quick reference: string functions, aggregate functions, relationship functions and shortest path queries.

MyBatis Deep Dive - Many-to-Many Model with Collection Tags

In database design, a "many-to-many" relationship means records in two tables can be associated with each other, with multiple records associated with multiple records.

MyBatis Deep Dive - One-to-Many Model with Collection Tags

In database design, one-to-many (One-to-Many) relationship is one of the most common relationship models.

Neo4j CQL Practice: WHERE, DELETE/DETACH, SET, Sorting and Pagination

Neo4j CQL advanced queries: WHERE clause filtering, DELETE removal, SET updates, ORDER BY sorting and pagination.

MyBatis Deep Dive - One-to-One Mapping, SqlMapConfig and Mapper XML Configuration

Detailed explanation of one-to-one model mapping in MyBatis, including database table design, Java entity class definitions, Mapper interface and XML configuration.

MyBatis Deep Dive - Dynamic SQL, Parameters, Foreach and SQL Fragments

In-depth explanation of MyBatis dynamic SQL configuration including if conditions, where tags, foreach loops, and sql fragment extraction.

Neo4j CQL Practice: CREATE/MATCH and Relationship Modeling

Neo4j CQL query language guide: CREATE creates nodes and relationships, MATCH queries graph data, with complete code examples for graph database operations and traversal...

MyBatis Mapper Proxy Invoke - Source Code Analysis

Detailed introduction to MyBatis Mapper Proxy dynamic proxy implementation principles, including getMapper source code analysis and MapperMethod execution process.

MyBatis Deep Dive - SqlSessionFactory, SqlSession, DAO and Mapper

In-depth explanation of MyBatis core components: SqlSessionFactory and SqlSession working principles, traditional DAO layer implementation, and MyBatis proxy development...

MyBatis Quick Start - CRUD Operations and XML Mapping Configuration

MyBatis quick start continuation covering CRUD operations, XML mapping configuration, annotation-based development, and datasource/transaction management.

Neo4j Installation and Quick Start | 10 Min Setup + Remote Access

Neo4j graph database Docker installation and remote access configuration, 10-minute quick start guide.

MyBatis SqlSession, Executor, StatementHandler - Source Code Analysis

2k, likes: 27, favorites: 13. Configuration comes from two sources: configuration files (main config.xml, mapper.xml) and Java code annotations.

MyBatis Plugin Mechanism - PageHelper and Generic Mapper

Detailed introduction to MyBatis pagination plugin PageHelper and Generic Mapper usage, including configuration, code examples, PageInfo class usage, and Generic Mapper C...

MyBatis Quick Start - POM, Mapper, Core Files, CRUD Operations and Annotation Mapping

MyBatis quick start tutorial covering MyBatis development steps including POM dependency configuration, Mapper mapping files, SqlMapConfig core configuration file...

MyBatis Deep Dive - ORM Concepts, Mapping Relations and Quick Start

ORM stands for Object/Relation Mapping: an abbreviation for object-relation mapping.

MySQL Master-Slave Replication: Read-Write Separation and Semi-Sync Replication

This article provides an in-depth explanation of MySQL master-slave replication: master-slave mode, read-write separation, semi-sync replication principles and configurat...

MySQL Design Guide: Availability, Scalability, Consistency

This article provides an in-depth explanation of MySQL database design: availability (redundancy, failover), scalability (sharding, read-write separation), consistency.

MySQL Deadlock: Principles, Scenarios and Prevention

This article provides an in-depth explanation of MySQL deadlocks: deadlock definition, necessary conditions, table lock deadlocks, row-level deadlocks, shared to exclusiv...

MySQL Lock Mechanism: From Table Locks to Row Locks

Pessimistic locking is a concurrency control mechanism based on a conservative "lock first, then modify" strategy.

MySQL Parallel Replication: From 5.6 to 8.0 Evolution

This article provides an in-depth explanation of MySQL parallel replication technology: from 5.6 database-based parallel to 5.7 group commit-based to 8.

MySQL Dual-Master Architecture and MMM High Availability

MySQL dual-master mode is a common high-availability database architecture solution, particularly suitable for the following business scenarios:

MySQL MHA Master-Slave Failover: Architecture and Implementation

Deep dive into MySQL MHA high availability solution: MHA architecture, fault handling, primary-standby switch, lag issues and solutions. This article analyzes principles...

MySQL Sharding Technologies Compared: Range, Hash, Consistent Hash and Geohash

Sharding is the core technology for horizontal scaling in distributed databases.

MySQL Distributed Primary Key Strategies: UUID, SnowFlake, Redis and ID Tables

Explore MySQL distributed primary key strategies including UUID, SnowFlake, COMB, Redis, and database ID table approaches with their principles, pros and cons...

MySQL Scaling Guide: Triggers, Migration, and Performance Optimization

Explore MySQL database horizontal scaling solutions for capacity, performance, and concurrency bottlenecks.

MySQL Sharding-JDBC: Lightweight Sharding and Read-Write Separation Middleware

A comprehensive guide to Sharding-JDBC, a lightweight Java database middleware solving database sharding, read-write separation and distributed transactions.

MySQL Sharding-JDBC: Physical Tables, Logical Tables and Binding Tables

In distributed databases, sharding is implemented through physical tables, logical tables, data nodes and binding tables.

MySQL ShardingSphere: SQL Parse, Route, Rewrite and Execution Flow

Deep dive into ShardingSphere's sharding flow including SQL parsing, query optimization, SQL routing, SQL rewriting, SQL execution and result merging six major stages wit...

MySQL Read-Write Separation: Master-Slave Architecture Design and Routing

Read-write separation is a common database architecture optimization technique that separates write operations to master and read operations to slaves through master-slav...

MySQL ShardingSphere: SQL Support, Limitations and Optimization Practices

Deep dive into ShardingSphere's SQL support scope, limitations, and optimization practices in sharding scenarios. Learn about supported SQL types, pagination subquery res...

MySQL Sharding-JDBC: Physical, Logical and Binding Tables Explained

In distributed databases, sharding uses physical tables, logical tables, data nodes and binding tables for efficient data storage and queries.

MySQL ShardingSphere Saga: Flexible Transaction Implementation

ShardingSphere's flexible transactions are implemented through the third-party servicecomb-saga component, using SPI mechanism for dynamic injection.

Seata Framework: Four Transaction Modes & Core Architecture

Seata is Alibaba's open-source distributed transaction solution providing one-stop transaction management with high performance, low intrusion and multi-language support.

MySQL XA Distributed Transactions: ShardingSphere Integration and Practice

Traditional approaches rely on database vendor XA drivers and application server transaction managers. Modern systems use embedded transaction managers.

ShardingSphere Data Masking: Transparent Encryption and Compliance

Data masking is a key data security technology that balances data utility and privacy protection by replacing, encrypting or perturbing sensitive information.

ShardingSphere Saga Flexible Transaction Implementation

ShardingSphere's flexible transactions are implemented through the third-party servicecomb-saga component, using SPI mechanism for dynamic injection.

MySQL MyCat Distributed Database Middleware: Architecture and Core Principles

MyCat is an open-source distributed database middleware fully compatible with MySQL protocol.

Sharding-Proxy: Zero-Code-Invasive Database Sharding Solution

Sharding-Proxy is one of the core products in the Apache ShardingSphere ecosystem, using a transparent database proxy architecture.

MyCat Sharding Strategies: E-R, Global Tables and Sharding Rules

MyCat distributed database sharding strategies include E-R table sharding, global table mechanism, shard nodes, node hosts and sharding rules.

MyCat server.xml: Core Configuration File Guide

server.xml is MyCat's core configuration file, storing almost all system configuration information needed by MyCat.

MyCat Installation and Configuration: Setup, Service Management and Schema Files

MyCAT is an open-source database middleware supporting MySQL protocol, commonly used for database sharding and data sharding management.

MySQL Transaction Isolation Levels: From READ UNCOMMITTED to SERIALIZABLE

MySQL transaction isolation levels include READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ and SERIALIZABLE. Each level solves different concurrency problems.

MySQL Transactions: ACID Properties, Isolation Levels and Use Cases

MySQL database transaction is a set of SQL operations executed as a single logical unit of work, following ACID principles: Atomicity, Consistency, Isolation and Durabili...

MyCat schema.xml: Logical Database, Tables, Data Nodes Guide

schema.xml is MyCat's core configuration file managing logical databases, logical tables, data nodes and data hosts.

MySQL Transaction Issues: Dirty Read, Non-Repeatable Read and Phantom Read

Common issues in database transactions include dirty read, non-repeatable read, and phantom read. These issues are closely related to database isolation levels.

Spring Boot Transaction Propagation: From REQUIRED to NESTED

Transaction propagation is an important mechanism in Spring for handling transaction boundaries, defining how methods interact with transaction context in the call chain.

Spring Boot Declarative vs Programmatic Transactions

Introduces declarative transaction and programmatic transaction concepts, usage methods and comparative analysis.

Spring Transaction Pitfalls Part 2: Common Issues and Solutions

Spring transactions are implemented through AOP dynamic proxies. JDK dynamic proxy requires the target method to be public.

Spring Boot @Transactional: Propagation, Isolation and Rollback Rules

Detailed introduction to @Transactional annotation parameters in Spring Boot, including transaction propagation, isolation levels, and exception rollback strategies.

MyBatis Plugin Mechanism - Principles, Custom Plugins, Source Code Analysis

Generally, open-source frameworks provide plugins or extension points for developers to extend on their own.

Spring Transaction Pitfalls Part 1: Common Issues and Solutions

Spring transaction pitfalls commonly occur in scenarios like classes not managed by Spring, transaction manager not started, improper method modifiers (final, static...

Spring Transaction Pitfalls Part 3: Common Issues and Solutions

Spring transaction pitfalls include rollbackFor configuration errors, transaction annotation overrides, nested transaction issues and more.

MongoDB Basic Operations: Database, Collection & CRUD Guide

MongoDB common commands include show dbs to list databases, use to switch databases, db.createCollection() to create collections, show collections to list collections, db.

MongoDB BSON Format: Core Storage Format vs JSON

BSON is MongoDB's core storage format, a binary-encoded JSON-like format. Compared to JSON, BSON supports more data types like Date, Binary, ObjectId, with better perform...

Spring Transaction Pitfalls Part 4: Multi-Threading and Exception Handling

Spring transaction pitfalls include multi-threaded calls, exception catching without rollback, manual exception throwing errors.

MongoDB Indexing: Types, Principles & Best Practices

MongoDB indexes are core mechanisms for improving query performance, including single field indexes, compound indexes, multi-key indexes, geospatial indexes...

MongoDB Index Management & explain Execution Plan Analysis

MongoDB index management includes createIndex, getIndexes, dropIndex operations.

MongoDB Aggregation: $match, $group, $project and $sort Pipelines

MongoDB aggregation framework processes documents through multi-stage pipelines, implementing complex operations similar to SQL GROUP BY, JOIN, SUM, AVG.

MongoDB Pagination: skip() + limit() + sort() & Performance

MongoDB implements pagination through combination of skip(), limit() and sort() methods.

MongoDB Data Insert, Batch Write and Logical Queries with AND/OR

MongoDB data operations include single insertOne() and batch insertMany(). Query operators include $eq, $ne, $gt, $lt, etc. Logical operators include $and, $or, $not.

MongoDB Use Cases & Selection Guide

MongoDB is suitable for website data storage, caching systems, big data analysis, IoT, social media, live streaming platforms and more.

Spring Boot MongoDB: Template vs Repository with Index Tips

Two ways to connect Spring Boot to MongoDB: MongoTemplate and MongoRepository, with complete Java code examples and common problem troubleshooting.

Java MongoDB CRUD: Complete Guide from Setup to Operations

Complete guide to accessing MongoDB with Java, including environment setup, Maven dependencies, connection, CRUD operations, POJO mapping, index management.

MongoDB Slow Query Analysis & Index Tuning

MongoDB slow query analysis through built-in Profiler, set db.setProfilingLevel(1, m) to record slow queries. EXPLAIN analysis helps identify performance bottlenecks and...

MongoDB Storage Engines: WiredTiger vs InMemory Comparison

Comparison of MongoDB's two main storage engines WiredTiger and InMemory, including configuration methods and verification steps. WiredTiger recommended for production en...

MongoDB Replica Set Containerization: Keyfile and Auth Quick Start

MongoDB 7 replica set containerization best practices: generate keyfile, explicitly enable --auth, use one-time container for rs.initiate and admin user creation.

MongoDB Replica Set Deployment: Single Machine, Three Instances

MongoDB replica set single machine three instance deployment guide including configuration, initialization, adding/removing nodes, elections, read-write separation and ro...

MongoDB Data Modeling: Embedded vs Reference Selection Guide

MongoDB data modeling choice between embedded and reference, following three principles: embed for 1:few, use reference for unbounded growth, use $lookup+index for cross-...

MongoDB Replica Set: oplog, Heartbeat & Elections Explained

MongoDB replica set concepts: oplog location and idempotency, heartbeat frequency and election timeout, member/voting limits (50/7). Note that master-slave replication wa...

MongoDB Production Security Hardening: Auth, RBAC & TLS

MongoDB production environment security hardening guide including authentication, RBAC minimum privileges, internal network bindIp/firewall ACL, TLS/SSL encryption.

MongoDB Sharding: Shard, Config Server and Mongos Complete Guide

MongoDB sharded cluster detailed explanation: sharding consists of Shard, Config Server, Mongos. Shard key selection includes range sharding, hashed sharding...

MongoDB Auth and Permissions: From Single Instance to Sharded Cluster

MongoDB authentication and permission configuration from single instance to sharded cluster. Implementation order: create admin/root first → enable authorization → assign...

MongoDB Sharded Cluster Deployment: Complete Guide with Scripts

Step-by-step MongoDB sharded cluster setup (configsvr×3 + two shard replica sets×3 nodes + multiple mongos), including configuration, initialization, adding shards...

Neo4j Graph Theory: Euler Path and Circuit with Python NetworkX

Euler path/circuit determination: undirected graphs check connectivity and odd-degree vertices, directed graphs check weak connectivity and in/out-degree balance.

MySQL Transaction Isolation Levels: Read Uncommitted to Serializable

This article provides an in-depth explanation of MySQL transaction isolation levels: Read Uncommitted, Read Committed, Repeatable Read, and Serializable...

MyBatis Level 2 Cache Integration with Redis, Testing and Source Code Analysis

Currently, the level 2 cache we implement is per service. At this time, the cache is on a single server.

MyBatis Deep Dive - Level 1 Cache, Code Testing, and Source Code Analysis

Detailed introduction to MyBatis level 1 cache working principles, code testing, invalidation scenarios, and source code analysis.

MyBatis Level 2 Cache - Testing and Source Code Analysis

Detailed introduction to MyBatis level 2 cache working principles, enable configuration, code testing, and source code analysis.

Spark Super WordCount: Text Cleaning & MySQL Persistence

This is article 75 in the Big Data series, on top of basic WordCount add text preprocessing and database persistence, build a near-production word frequency pipeline.

Big Data 178 - Elasticsearch 7.3 Java Practice: Index and Document CRUD

This article details the complete flow for index and document CRUD operations using Elasticsearch 7.3.0 and RestHighLevelClient.

Spark RDD Deep Dive: Five Key Features

This is article 69 in the Big Data series, deeply analyzing RDD, Spark's core data abstraction, its five key features and design principles.

Spark RDD Creation & Transformation Operations

This is article 70 in the Big Data series, comprehensively explaining Spark RDD's three creation methods and practical usage of common Transformation operators.

Kafka Topic Management: Commands & Java API

Comprehensive introduction to Kafka Topic operations, including kafka-topics.sh commands, replica assignment strategy principles, and KafkaAdminClient Java API core usage.

Kafka Producer Interceptor & Interceptor Chain

Introduction to Kafka 0.10 Producer interceptor mechanism, covering onSend and onAcknowledgement interception points, interceptor chain execution order and error isolatio...

Big Data 60 - Kafka Consumer: Consumption Flow, Heartbeat and Parameter Tuning

Detailed explanation of Kafka Consumer Group consumption model, partition assignment strategy, heartbeat keep-alive mechanism, and tuning practices for key parameters lik...

Big Data 147 - Java Access Apache Kudu: From Table Creation to CRUD

Java client (kudu-client 1.4.0) connects to Apache Kudu with multiple Masters (example ports 7051/7151/7251), completes full process of table creation.

Kafka Producer Message Sending Flow & Core Parameters

Deep analysis of Kafka Producer initialization, message interception, serialization, partition routing, buffer batch sending, ACK confirmation and complete sending chain.

Kafka Serialization & Partitioning: Custom Implementation

Deep dive into Kafka message serialization and partition routing, including complete code for custom Serializer and Partitioner, mastering precise message routing and eff...

Kafka Operations: Shell Commands & Java Client Examples

Covers Kafka daily operations: daemon startup, Shell topic management commands, and Java client programming (complete Producer/Consumer code) with key configuration param...

Spring Boot Integration with Kafka

Detailed guide on integrating Kafka in Spring Boot projects, including dependency configuration, KafkaTemplate sync/async message sending, and complete @KafkaListener con...

Big Data 131 - Flink CEP Practice: 24 Hours ≥5 Transactions & 10 Minutes Unpaid Detection Cases

Flink CEP (Complex Event Processing) is an extension library provided by Apache Flink for real-time complex event processing.

Big Data 132 - Flink SQL Quick Start | Table API + SQL in 3 Minutes with toChangelogStream New Syntax

Engineering perspective to quickly run Flink SQL: Provides modern dependencies (no longer using blink planner), minimum runnable example (MRE).

Flink CEP Deep Dive: Complex Event Processing Complete Guide

Flink CEP (Complex Event Processing) is a core component of Apache Flink, specifically designed for processing complex event streams.

Flink CEP Timeout Event Extraction: Complete Guide with Matched and Timed-out Events

Flink CEP timeout event extraction is a key step in stream processing, used to capture partial matching events that exceed the window time (within) during pattern matchin...

Flink StateBackend Deep Dive: Memory, Fs, RocksDB and Operator State

ManagedOperatorState is used to manage non-keyed state, achieving state consistency when operators recover from faults or scale.

Flink Parallelism Deep Dive: From Concepts to Best Practices

Basic Concept of Parallelism In Apache Flink, Parallelism refers to the number of parallel tasks that can run simultaneously for each operator during execution.

Big Data 125 - Flink Broadcast State: Dynamic Logic Updates in Real-Time Streaming

Broadcast State is an important mechanism in Apache Flink that supports dynamic logic updates in streaming applications.

Big Data 126 - Flink State Backend: Memory, Fs, RocksDB and Performance Differences

State Storage Methods: MemoryStateBackend: Stores state in TaskManager's Java memory. Fast but limited (5MB per state default, 10MB per task).

Flink Parallelism Setting Priority: Principles, Configuration and Tuning

A Flink program consists of multiple Operators (Source, Transformation, Sink).

Big Data 124 - Flink State: Keyed State, Operator State and KeyGroups

Based on whether intermediate state is needed, Flink computation can be divided into stateful and stateless: Stateless computation like Map, Filter, FlatMap.

Big Data 50 - Redis Distributed Lock: Optimistic Lock, WATCH and SETNX

Redis optimistic lock in practice: WATCH/MULTI/EXEC mechanism explained, Lua scripts for atomic operations, SETNX+EXPIRE distributed lock from basics to Redisson...

Big Data 121 - Flink Time Semantics: EventTime, ProcessingTime, IngestionTime & Watermarks

Watermark is a special marker used to tell Flink the progress of events in the data stream.

Big Data 122 - Flink Watermark Guide: Event Time, Out-of-Order Data and Late Events

When using event-time based windows, Flink relies on Watermark to decide when to trigger window computation.

Flink Window Complete Guide: Tumbling, Sliding, Session

Flink's Window mechanism is the core bridge between stream processing and unified batch processing architecture.

Flink Sliding Window Deep Dive: Principles, Use Cases and Implementation

Sliding window is a more generalized form of fixed window, achieving dynamic window movement through introducing slide interval. It consists of two key parameters

Flink JDBC Sink Deep Dive: MySQL Real-time Write, Batch Output and Retry

In Apache Flink, JDBC Sink is an important data output component that allows writing stream or batch processed data to relational databases through JDBC connections.

Flink Batch Processing DataSet API: Use Cases, Code Examples and Core Operators

Apache Flink's DataSet API is the core programming interface for Flink batch processing, specifically designed for processing static, bounded datasets.

Big Data 115 - Flink DataStream Transformation: Map, FlatMap and Filter

Flink provides rich operators for DataStream to support flexible data stream processing in different scenarios.

Big Data 116 - Flink Sink Usage Guide: Types, Fault Tolerance Semantics & Scenarios

Flink's Sink is the final output endpoint for data stream processing, used to write processed results to external systems or storage media.

Flink Source Operator Deep Dive: Non-Parallel Source Principles

Non-Parallel Source is a source operation in Flink with fixed parallelism of 1. It can only run in a single instance regardless of cluster scale, ensuring tasks are proce...

Flink SourceFunction to RichSourceFunction: Enhanced Source Lifecycle and Resource Management

RichSourceFunction and RichParallelSourceFunction are enhanced source functions suitable for scenarios requiring complex logic and resource management.

Big Data 111 - Flink on YARN Deployment: Environment Variables, Configuration & Resource Requests

Deploying Flink in YARN mode requires completing a series of environment configuration and cluster management operations.

Flink DataStream API: DataSource, Transformation and Sink Components

DataSource, Transformation and Sink. DataSource provides diverse data input methods including file systems, message queues, databases and custom data sources.

Redis Lua Scripts: EVAL, redis.call and Atomic Operations

Systematic explanation of Redis Lua script EVAL command syntax, differences between redis.call and redis.

Big Data 37 - HBase Java API: Complete CRUD Code with Table Creation

Using HBase Java Client API to implement table creation, insert, delete, Get query, full table scan, and range scan.

ZooKeeper Distributed Lock Java Implementation Details

This is article 32 in the Big Data series. Demonstrates how to implement fair distributed lock using ZooKeeper ephemeral sequential nodes, with complete Java code.

ZooKeeper Watcher Principle and Command Line Practice Guide

Complete analysis of Watcher registration-trigger-notification flow from client, WatchManager to ZooKeeper server, and zkCli command line practice demonstrating node CRUD...

ZooKeeper Java API Practice: Node CRUD and Monitoring

Use ZkClient library to operate ZooKeeper via Java code, complete practical examples of session establishment, persistent node CRUD, child node change monitoring...

MapReduce JOIN Four Implementation Strategies

This is article 11 in the Big Data series. Introduces four classic strategies for implementing multi-table JOIN in MapReduce framework and their Java implementations.

HDFS Java Client Practice: Upload/Download Files, Directory Operations and API Usage

This is article 9 in the Big Data series. Learn to operate HDFS through Java code, master Hadoop's Java Client API.

Java Implementation MapReduce WordCount Complete Code

Implement Hadoop MapReduce WordCount from scratch: Hadoop serialization mechanism detailed explanation, writing Mapper, Reducer, Driver three components...

Basic Environment Setup: Hadoop Cluster

This article is migrated from Juejin. Original link: Big Data 01 - Basic Environment Setup