Posts
All the articles I've posted.
Locks in Java (Part 1): Lock Categories
Focusing on the object header’s Mark Word, this article explains acquisition, contention, release, and promotion of biased, lightweight, and heavyweight locks. JOL examples inspect lock flags before and after synchronized code, followed by discussion of spinning, blocking, and suitable use cases.
Computer Networks: The Data Link Layer
An introduction to data-link frames, the maximum transmission unit, byte stuffing, and CRC error detection, followed by the role of network cards and MAC addresses. The article describes transmission and collision detection on broadcast channels and gathers related notes on modems, optical fiber, and switches.
Computer Networks: The Transport Layer
Starting from ports and inter-process communication, this article introduces TCP's byte-stream transmission, automatic retransmission, sliding window, and segment structure. It uses Wireshark packet captures to analyze the three-way handshake and the four-way termination, and discusses connection states such as TIME-WAIT and CLOSE-WAIT together with related troubleshooting scenarios.
Computer Networking: The Network Layer
Reviews IPv4 address classes, ARP address resolution, IP datagrams, subnet masks, and routing, and explains the relationship between IP and MAC addresses. It also records troubleshooting connection failures after rebuilding AWS VPC instances and the solution of retaining network interfaces.
Computer Buses and Memory
This article outlines bus architectures and the roles of data, address, and control buses, with examples of bus width and bandwidth. It also describes main memory, cache, and secondary storage and explains memory reads and writes using MAR and MDR.
A Few Things to Know About Computer Organization
This article introduces the five major hardware components and common CPU and memory registers, then uses addition to explain instruction fetch, decoding, and execution. It also demonstrates main-memory capacity calculations using address width, word length, and unit conversion.
Analyzing the ShardingJDBC Execution Flow
Uses the MyBatis call flow to analyze how ShardingJDBC 4.1.1 integrates with JDBC through custom DataSource, Connection, and PreparedStatement implementations. It traces parameter buffering, physical connection acquisition, and result-set handling, then simulates the proxy workflow with simplified code.
Getting Started with Redis (Part 4): Monitoring and Automatic Recovery with Sentinel
Redis Sentinel configuration and logs illustrate monitoring and automatic failover, including subjective and objective down states, leader election, and selection of a new primary. The article also shows replica promotion and replication changes, and discusses deploying multiple Sentinels and configuring voting thresholds.