Java.
31 posts — Posts about Java
PolarDB's Storage-Compute Separation
An architectural look at PolarDB's storage-compute separation: how decoupling compute from storage addresses scalability, storage cost, and high availability, compared with AWS Aurora and traditional MySQL architecture.
Microservice Architecture Design
Starting from the bottlenecks of monolithic architecture, this post walks through the core design principles of microservices, the overall architecture, and key design questions — plus their scalability, adoption challenges, and where they actually fit.
Designing L1 and L2 Caches
A look at the two-tier caching architecture combining a local (L1) cache with a Redis (L2) cache: the access flow, what each tier solves, consistency and capacity control, and common cache update strategies.
Exploring etcd
Starting from real distributed coordination needs, this post covers what etcd is for and how Raft delivers strong consistency, walks through a cluster setup verified with etcdctl, and compares etcd with Redis for coordination workloads.
A Deep Dive into Netty
Starting from the limitations of BIO, this post works through Java NIO's three core components — Channel, Buffer, and Selector — and the Reactor threading model, to understand the design ideas behind Netty's high-performance networking.
Redis Distributed Locks
From local locks to distributed locks: implementing locking and safe release with Redis atomic commands, plus lock expiration, WatchDog renewal, consistency risks under master-replica failover, and the trade-offs versus etcd/ZooKeeper.
A Real-Time Data Warehouse on Alibaba Cloud
Building a fully managed real-time data warehouse with Alibaba Cloud Flink, DataHub, and Hologres: component selection, processing pipeline, and the ODS/DWD/DWS/ADS layered warehouse design.
The Canal Component
Canal is Alibaba's open-source component for incremental subscription and consumption based on MySQL Binlog. This post walks through how it works, how it compares to other common CDC tools, and what to watch out for in a highly available cluster deployment.
Principles of Architecture Design
System architecture design means trading off scalability, reliability, performance, security, maintainability, and more. This post walks through these common design principles and the mindset an architect should bring to them.
Preventing Duplicate Form Submissions
The server generates a one-time token, stores it in Redis, sends it down with the form, and deletes it immediately after validation. Notes on how this mechanism defends against duplicate submissions and CSRF, how to implement it, and the security caveats.