<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zhuifeng Notes</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/</link><description>Recent content on Zhuifeng Notes</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 25 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://4f0a9a3b.wangpeng.pages.dev/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Dubbo Architecture and Core Concepts</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/architecture/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/architecture/</guid><description>&lt;p&gt;Dubbo&amp;rsquo;s core strength lies in its clear separation of responsibilities and its highly pluggable extension mechanism. Understanding the layering and the Invoker abstraction is the foundation for reading Dubbo&amp;rsquo;s source code and troubleshooting production issues.&lt;/p&gt;&#10;&lt;h2 id="layered-architecture"&gt;Layered Architecture&#10;&lt;/h2&gt;&#10;&lt;p&gt;From top to bottom Dubbo is divided into logical layers, each depending only on the interface (not the implementation) of the layer below:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;service / config layer&lt;/strong&gt;: the user-facing API and configuration layer, where &lt;code&gt;@DubboService&lt;/code&gt;, &lt;code&gt;@DubboReference&lt;/code&gt;, &lt;code&gt;ReferenceConfig&lt;/code&gt; and &lt;code&gt;ServiceConfig&lt;/code&gt; live.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;proxy layer&lt;/strong&gt;: generates dynamic proxies for service interfaces so remote calls are transparent to business code.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;registry layer&lt;/strong&gt;: encapsulates service registration and subscription, sensing provider/consumer up and down events.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;cluster layer&lt;/strong&gt;: wraps multiple Invokers into a &amp;ldquo;cluster Invoker&amp;rdquo;, responsible for load balancing, fault tolerance and routing.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;protocol layer&lt;/strong&gt;: encapsulates the RPC call; the core of Invoker export and reference.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;filter chain&lt;/strong&gt;: interceptors across the call path, usable for logging, auth, rate limiting and other cross-cutting concerns.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="invoker-and-spi"&gt;Invoker and SPI&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;Invoker&lt;/code&gt; is Dubbo&amp;rsquo;s universal domain model, representing &amp;ldquo;an executable and describable call&amp;rdquo;, abstracting local, remote and cluster invocations. &lt;code&gt;URL&lt;/code&gt; acts as the configuration bus running through every layer; almost every extension point passes parameters via URL.&lt;/p&gt;</description></item><item><title>Kafka Storage and Consumption Model</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/kafka/storage-consumer/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/kafka/storage-consumer/</guid><description>&lt;p&gt;Kafka&amp;rsquo;s high performance relies on &amp;ldquo;partitioned log + sequential writes + batched pulls&amp;rdquo;. Understanding the storage and consumption model is essential to configure parallelism correctly and avoid duplicate consumption.&lt;/p&gt;&#10;&lt;h2 id="topics-and-partitions"&gt;Topics and Partitions&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A &lt;strong&gt;topic&lt;/strong&gt; is a logical subject; a &lt;strong&gt;partition&lt;/strong&gt; is the physical unit of parallelism, and messages are only appended to the end of a partition.&lt;/li&gt;&#10;&lt;li&gt;Each partition is an ordered, immutable log composed of multiple segment files, maintaining an offset (unique and monotonically increasing within the partition).&lt;/li&gt;&#10;&lt;li&gt;The partition count determines the upper bound of consumption parallelism: at any moment a partition is consumed by exactly one consumer within a group.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="offset-and-consumption-position"&gt;Offset and Consumption Position&#10;&lt;/h2&gt;&#10;&lt;p&gt;The position a consumer commits after processing messages is the &lt;strong&gt;offset&lt;/strong&gt;, which Kafka stores in the internal topic &lt;code&gt;__consumer_offsets&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>MySQL Indexing Internals and Best Practices</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/mysql/indexing/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/mysql/indexing/</guid><description>&lt;p&gt;Indexes are the decisive factor for MySQL query performance. Understanding InnoDB&amp;rsquo;s B+Tree index structure is the only way to write SQL that truly hits indexes.&lt;/p&gt;&#10;&lt;h2 id="btree-and-the-clustered-index"&gt;B+Tree and the Clustered Index&#10;&lt;/h2&gt;&#10;&lt;p&gt;InnoDB organizes indexes with a B+Tree whose non-leaf nodes only store index keys for navigation, while all data lives in leaf nodes that are linked in a doubly-linked list, which is ideal for range scans.&lt;/p&gt;</description></item><item><title>Redis Data Structures and Underlying Implementation</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/redis/data-structures/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/redis/data-structures/</guid><description>&lt;p&gt;Redis exposes five common types to users, but underneath there are multiple encodings (encoding). Automatically switching encodings based on data size is the key to balancing memory and performance.&lt;/p&gt;&#10;&lt;h2 id="core-underlying-structures"&gt;Core Underlying Structures&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;SDS (Simple Dynamic String)&lt;/strong&gt;: records length and pre-allocates space compared to C strings, avoiding buffer overflow and supporting binary safety.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ziplist / listpack&lt;/strong&gt;: compact contiguous-memory lists that save space and suit small data volumes.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;linkedlist&lt;/strong&gt;: a doubly-linked list that replaces ziplist when there are many elements.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;dict (dictionary)&lt;/strong&gt;: a hash table using chaining for collisions, with progressive rehash to avoid blocking.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;skiplist (skip list)&lt;/strong&gt;: a multi-level ordered linked list, combined with dict to implement zset for efficient range queries.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="encodings-and-conversions-per-type"&gt;Encodings and Conversions per Type&#10;&lt;/h2&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Type&lt;/th&gt;&#10; &lt;th scope="col"&gt;Small-data encoding&lt;/th&gt;&#10; &lt;th scope="col"&gt;Large-data encoding&lt;/th&gt;&#10; &lt;th scope="col"&gt;Conversion threshold (illustrative)&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;string&lt;/td&gt;&#10; &lt;td&gt;int / embstr&lt;/td&gt;&#10; &lt;td&gt;raw&lt;/td&gt;&#10; &lt;td&gt;length &amp;gt; 44 bytes becomes raw&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;hash&lt;/td&gt;&#10; &lt;td&gt;ziplist/listpack&lt;/td&gt;&#10; &lt;td&gt;hashtable&lt;/td&gt;&#10; &lt;td&gt;element count or single value exceeds threshold&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;list&lt;/td&gt;&#10; &lt;td&gt;quicklist (ziplist segments)&lt;/td&gt;&#10; &lt;td&gt;quicklist&lt;/td&gt;&#10; &lt;td&gt;—&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;set&lt;/td&gt;&#10; &lt;td&gt;intset&lt;/td&gt;&#10; &lt;td&gt;hashtable&lt;/td&gt;&#10; &lt;td&gt;contains non-integers or too many elements&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;zset&lt;/td&gt;&#10; &lt;td&gt;ziplist&lt;/td&gt;&#10; &lt;td&gt;skiplist+dict&lt;/td&gt;&#10; &lt;td&gt;element count or value length exceeds threshold&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;Taking &lt;code&gt;zset&lt;/code&gt; as an example, small data uses a compact ziplist (member and score adjacent); when the element count or a single member length exceeds the threshold it converts to &lt;code&gt;skiplist + dict&lt;/code&gt;, ensuring ordered traversal and member lookup are O(1)/O(log n).&lt;/p&gt;</description></item><item><title>ZooKeeper Data Model and the ZAB Protocol</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/zookeeper/model-zab/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/zookeeper/model-zab/</guid><description>&lt;p&gt;ZooKeeper&amp;rsquo;s reliability comes from its simple data model and the strongly-consistent ZAB protocol. Understanding both is a prerequisite for using ZK correctly.&lt;/p&gt;&#10;&lt;h2 id="the-znode-data-model"&gt;The znode Data Model&#10;&lt;/h2&gt;&#10;&lt;p&gt;ZK maintains a hierarchical tree similar to a file system; each node is a &lt;strong&gt;znode&lt;/strong&gt; that can hold both data and children. Its type determines lifecycle and concurrency semantics:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Persistent / Ephemeral&lt;/strong&gt;: ephemeral nodes are auto-deleted when the session disconnects, forming the basis of distributed locks and leader election.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Plain / Sequential&lt;/strong&gt;: sequential nodes get a monotonically increasing sequence number appended on creation.&lt;/li&gt;&#10;&lt;li&gt;Each znode carries &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;cversion&lt;/code&gt;, &lt;code&gt;aversion&lt;/code&gt;; versions increment on modification, providing optimistic-lock semantics.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="session-and-watcher"&gt;Session and Watcher&#10;&lt;/h2&gt;&#10;&lt;p&gt;A client establishes a &lt;strong&gt;session&lt;/strong&gt; with the server, kept alive via heartbeats. On session timeout the server cleans up its ephemeral nodes. A client can register a &lt;strong&gt;Watcher&lt;/strong&gt; on a node and receives a one-time notification when the node changes (data write, children change); it must re-register to keep watching.&lt;/p&gt;</description></item><item><title>PageFly</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/projects/pagefly/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/projects/pagefly/</guid><description>&lt;p&gt;PageFly is a lightweight publishing surface for AI workflows: write HTML or Markdown and ship it. Good for analysis pages, tool pages, and quick experiments.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Status&lt;/strong&gt;: Live&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;URL&lt;/strong&gt;: &lt;a href="https://fly.882680.xyz"&gt;https://fly.882680.xyz&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Stack&lt;/strong&gt;: Cloudflare Pages + Functions + KV (free tier)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Use cases&lt;/strong&gt;: personal workflow landing pages, light product prototypes, AI output showcases&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Distributed Coordination in Practice</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/zookeeper/coordination/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/zookeeper/coordination/</guid><description>&lt;p&gt;ZooKeeper offers primitive-level coordination; almost every distributed coordination need can be built from the combination of &amp;ldquo;ephemeral node + sequential node + Watcher&amp;rdquo;.&lt;/p&gt;&#10;&lt;h2 id="leader-election"&gt;Leader Election&#10;&lt;/h2&gt;&#10;&lt;p&gt;Each candidate creates an ephemeral sequential node under &lt;code&gt;/election&lt;/code&gt;; the one with the smallest sequence becomes Master. Non-smallest nodes watch their predecessor; when the predecessor disappears they re-evaluate whether they are now smallest, achieving automatic failover:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-889a3404-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="text" data-td-line-count="4"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-889a3404-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/election&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ├── /n_0000000001 (master)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ├── /n_0000000002 (watches 001)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; └── /n_0000000003 (watches 002)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="configuration-center"&gt;Configuration Center&#10;&lt;/h2&gt;&#10;&lt;p&gt;Write configuration into a persistent node; clients read it and register a Watcher. On configuration change the client receives a notification and hot-reloads without restarting the app. Keep config nodes small to avoid oversized single pushes.&lt;/p&gt;</description></item><item><title>Kafka Reliability and Exactly-Once</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/kafka/reliability/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/kafka/reliability/</guid><description>&lt;p&gt;Kafka&amp;rsquo;s reliability requires coordinated configuration across the producer, broker and consumer. We cover it through three goals: no loss, no duplication, ordered.&lt;/p&gt;&#10;&lt;h2 id="producer-side-reliability"&gt;Producer-Side Reliability&#10;&lt;/h2&gt;&#10;&lt;p&gt;Control write durability level via &lt;code&gt;acks&lt;/code&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;acks=0&lt;/code&gt;: considered successful as soon as sent; may lose messages; highest throughput.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;acks=1&lt;/code&gt;: success once the leader writes; may lose if the leader crashes.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;acks=all&lt;/code&gt;: success only after all ISR replicas sync; safest, combined with &lt;code&gt;min.insync.replicas&lt;/code&gt; to avoid single points.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Enabling retries (&lt;code&gt;retries&lt;/code&gt;) handles transient failures but introduces &lt;strong&gt;duplicates&lt;/strong&gt;: network jitter causes the producer to retry without receiving the ack, writing the same message twice.&lt;/p&gt;</description></item><item><title>Redis Cache Design</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/redis/cache-design/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/redis/cache-design/</guid><description>&lt;p&gt;Introducing a cache dramatically reduces database pressure, but poor design introduces the classic problems of penetration, breakdown and avalanche. We break down the causes and countermeasures below.&lt;/p&gt;&#10;&lt;h2 id="the-three-classic-problems"&gt;The Three Classic Problems&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Cache penetration&lt;/strong&gt;: querying data that does not exist, so neither cache nor DB returns it and every request hits the DB. Mitigate with caching empty values (short TTL) or a Bloom filter to block illegal keys.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Cache breakdown&lt;/strong&gt;: the moment a hot key expires, many concurrent requests all fall back to the DB at once. Mitigate with a mutex (only one thread rebuilds), logical expiration (async refresh), or never-expire hot keys.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Cache avalanche&lt;/strong&gt;: a large number of keys expire simultaneously, or Redis becomes entirely unavailable, overwhelming the DB. Mitigate with random jitter on expiration times, multi-level caching, and Redis high availability (Sentinel/Cluster).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="cache-aside-and-consistency"&gt;Cache-Aside and Consistency&#10;&lt;/h2&gt;&#10;&lt;p&gt;The most common pattern is &lt;strong&gt;Cache-Aside (旁路缓存)&lt;/strong&gt;:&lt;/p&gt;</description></item><item><title>Service Registration and Discovery in Practice</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/registry-discovery/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/registry-discovery/</guid><description>&lt;p&gt;Service registration and discovery are the foundation of microservice architecture. Dubbo abstracts the registry as the &lt;code&gt;Registry&lt;/code&gt; interface, so you can switch smoothly between ZooKeeper, Nacos, Consul and others without changing business code.&lt;/p&gt;&#10;&lt;h2 id="connecting-a-registry"&gt;Connecting a Registry&#10;&lt;/h2&gt;&#10;&lt;p&gt;Using Nacos as an example, you only need to declare the registry address and protocol in configuration. On startup Dubbo automatically exports (export) and subscribes (subscribe) services:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-871d0e0c-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="yaml" data-td-line-count="8"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-871d0e0c-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;dubbo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;application&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;order-service&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;nacos://127.0.0.1:8848&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;dubbo&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20880&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;After a provider starts, it writes its metadata (interface, IP, port, weight, etc.) into the registry. When a consumer starts, it subscribes to the interface node, fetches the available provider list and caches it locally; subsequent calls go directly to the local cache, reducing registry pressure.&lt;/p&gt;</description></item><item><title>Transactions and Locking</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/mysql/transaction-lock/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/mysql/transaction-lock/</guid><description>&lt;p&gt;Under concurrency, transactions and locks together guarantee data consistency. InnoDB balances performance and isolation through the coordination of MVCC and locking.&lt;/p&gt;&#10;&lt;h2 id="acid-and-isolation-levels"&gt;ACID and Isolation Levels&#10;&lt;/h2&gt;&#10;&lt;p&gt;A transaction&amp;rsquo;s ACID is guaranteed by different mechanisms: atomicity by undo log, durability by redo log, isolation by MVCC and locks, and consistency is the ultimate goal.&lt;/p&gt;&#10;&lt;p&gt;The SQL standard defines four isolation levels; InnoDB defaults to &lt;code&gt;REPEATABLE READ&lt;/code&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;READ UNCOMMITTED: possible dirty reads&lt;/li&gt;&#10;&lt;li&gt;READ COMMITTED: avoids dirty reads, possible non-repeatable reads&lt;/li&gt;&#10;&lt;li&gt;REPEATABLE READ: avoids non-repeatable reads (InnoDB additionally avoids phantom reads)&lt;/li&gt;&#10;&lt;li&gt;SERIALIZABLE: fully serial, lowest performance&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="mvcc-and-logs"&gt;MVCC and Logs&#10;&lt;/h2&gt;&#10;&lt;p&gt;MVCC (Multi-Version Concurrency Control) lets reads avoid locks and reads/writes not block each other. Each row implicitly carries &lt;code&gt;trx_id&lt;/code&gt; and &lt;code&gt;roll_pointer&lt;/code&gt;, builds historical versions via undo log, and uses a ReadView to decide whether a version is visible to the current transaction.&lt;/p&gt;</description></item><item><title>Investment Advisor System</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/projects/investment-advisor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/projects/investment-advisor/</guid><description>&lt;p&gt;A personal investment research prototype: fetch A-share and fund data via AKShare, persist in Supabase, and use the All-Weather strategy as an asset allocation reference.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Status&lt;/strong&gt;: In progress&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Stack&lt;/strong&gt;: Python / AKShare / Supabase / All-Weather&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Goal&lt;/strong&gt;: wire up &amp;ldquo;data → backtest → portfolio tracking&amp;rdquo; into a reusable workflow&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Scope&lt;/strong&gt;: Personal research only; not investment advice&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Cognition Matching / AI Cognitive Profile</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/projects/cognitive-match/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/projects/cognitive-match/</guid><description>&lt;p&gt;A light-asset startup exploration: structure a person&amp;rsquo;s knowledge, preferences, and capabilities into an AI cognitive profile, then match them with opportunities (projects, people, content).&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Status&lt;/strong&gt;: Planning&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Form&lt;/strong&gt;: React + Claude API lightweight prototype&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Commitment&lt;/strong&gt;: ~18–27 hours per week, free/low-cost options preferred&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Core question&lt;/strong&gt;: How to turn &amp;ldquo;cognitive similarity&amp;rdquo; into a computable, explainable matching signal&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Chinese AI Humanizer Skill</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/projects/ai-humanizer-skill/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/projects/ai-humanizer-skill/</guid><description>&lt;p&gt;A WorkBuddy skill (v3.0.0-zh) that strips AI-generated flavor from Chinese text. Covers 18 categories: exaggerated symbolism, promotional language, shallow -ing analysis, vague attribution, dash overuse, rule-of-three paragraphs, AI vocabulary, and more.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Version&lt;/strong&gt;: v3.0.0-zh&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Form&lt;/strong&gt;: WorkBuddy skill&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Use cases&lt;/strong&gt;: WeChat articles, technical docs, emails, reports — anywhere Chinese should sound human&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Approach&lt;/strong&gt;: detect tell patterns first, then rewrite by category&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Banking Ontology</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/projects/banking-ontology/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/projects/banking-ontology/</guid><description>&lt;p&gt;Structuring recurring banking concepts — organization, products, accounts, transactions, customers, channels, risk, regulatory reporting — into an ontology that becomes a reusable knowledge framework.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Status&lt;/strong&gt;: Research&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Outputs&lt;/strong&gt;: slide deck, concept diagrams, domain glossary&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Goal&lt;/strong&gt;: a shared language for mapping business → technology → data&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Related areas&lt;/strong&gt;: ECIF, MDM, regulatory reporting, data assets&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>First post — why "Zhuifeng Notes"</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/blog/welcome/</link><pubDate>Sat, 15 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/blog/welcome/</guid><description>&lt;p&gt;After years of building banking system architecture, most of what I&amp;rsquo;ve learned — the pitfalls, the hard-won insights — lived scattered across notes and chat logs. This site is where I organize them.&lt;/p&gt;&#10;&lt;h2 id="what-ill-write"&gt;What I&amp;rsquo;ll write&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Architecture&lt;/strong&gt;: ECIF, core banking, distributed architecture, and how Domain-Driven Design (DDD) lands in banking.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Banking&lt;/strong&gt;: payment clearing, interest and limits, accounts/cards, AML/KYC/CRS.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Data&lt;/strong&gt;: data governance, encryption and security, sharding, messaging and stream processing.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="who-its-for"&gt;Who it&amp;rsquo;s for&#10;&lt;/h2&gt;&#10;&lt;p&gt;Peers, engineers moving into fintech, and anyone curious about &lt;em&gt;why&lt;/em&gt; banking systems are designed the way they are.&lt;/p&gt;</description></item><item><title>Applying DDD Aggregates in a Banking ECIF</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/columns/architecture/ddd-aggregate/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/columns/architecture/ddd-aggregate/</guid><description>&lt;p&gt;In an ECIF, the concept of &amp;ldquo;customer&amp;rdquo; is huge: retail, corporate, and interbank clients each have different attributes, relationships, and lifecycles. Forcing them into one giant &lt;code&gt;Customer&lt;/code&gt; entity makes the code rot fast.&lt;/p&gt;&#10;&lt;h2 id="slice-by-bounded-context"&gt;Slice by bounded context&#10;&lt;/h2&gt;&#10;&lt;p&gt;Split the customer across bounded contexts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Party (master data)&lt;/strong&gt;: unified natural-person / institution identity and base attributes.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Profile&lt;/strong&gt;: risk appetite, marketing tags — high read/write churn.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Relationship&lt;/strong&gt;: shareholding, guarantee, and group relationships.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="where-the-aggregate-root-goes"&gt;Where the aggregate root goes&#10;&lt;/h2&gt;&#10;&lt;p&gt;Each context defines its own aggregate root. In Party, &lt;code&gt;Party&lt;/code&gt; is the root; &lt;code&gt;Address&lt;/code&gt; and &lt;code&gt;Contact&lt;/code&gt; are value objects, keeping cross-aggregate calls out of the consistency boundary.&lt;/p&gt;</description></item><item><title>ECIF in one read — why customer data must be centralized</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/columns/banking/ecif-overview/</link><pubDate>Mon, 10 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/columns/banking/ecif-overview/</guid><description>&lt;p&gt;Before ECIF, branches, internet banking, and the card center each kept their own customer records. The same person appeared with different names, IDs, and contacts across systems — making both marketing and risk control impossible.&lt;/p&gt;&#10;&lt;h2 id="what-ecif-solves"&gt;What ECIF solves&#10;&lt;/h2&gt;&#10;&lt;p&gt;ECIF (Enterprise Customer Information Facility) consolidates customer master data scattered across business systems into one place, exposing a &lt;strong&gt;single customer view&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Unique identity&lt;/strong&gt;: a Party ID unifies natural persons / institutions, not the ID number.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Primary/secondary&lt;/strong&gt;: supports one person many accounts, one account many cards, with unique master data.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Service-oriented&lt;/strong&gt;: other systems query via interfaces instead of keeping their own copies.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="key-technical-trade-offs"&gt;Key technical trade-offs&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Read/write split&lt;/strong&gt;: master writes are strongly consistent; queries can hit cache / read replicas.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Auditable changes&lt;/strong&gt;: customer changes are traced to satisfy regulatory audits.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;ECIF is not &amp;ldquo;yet another database&amp;rdquo; — it is the bedrock of bank digitalization.&lt;/p&gt;</description></item><item><title>Bank Data Governance — metadata before quality</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/columns/data/data-governance/</link><pubDate>Sat, 08 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/columns/data/data-governance/</guid><description>&lt;p&gt;Many bank data-governance programs degenerate into &amp;ldquo;fill in the metadata, assign owners.&amp;rdquo; To get results, governance must be built into the data production pipeline.&lt;/p&gt;&#10;&lt;h2 id="do-two-things-first"&gt;Do two things first&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Metadata &amp;amp; lineage&lt;/strong&gt;: where a field comes from, which jobs transform it, where it flows — must be tracked automatically.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Quality rules built-in&lt;/strong&gt;: non-null, uniqueness, consistent definitions act as ETL/lakehouse &lt;em&gt;gates&lt;/em&gt;; bad data never lands.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="security--encryption"&gt;Security &amp;amp; encryption&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Encryption at rest&lt;/strong&gt;: sensitive fields (ID numbers, card numbers) encrypted on disk.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Dynamic masking&lt;/strong&gt;: query-side masking by role; dev environments never see plaintext.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;The goal of governance isn&amp;rsquo;t a pretty report — it&amp;rsquo;s giving downstream systems confidence to use the data.&lt;/p&gt;</description></item><item><title>About</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/about/</guid><description>&lt;h2 id="bio"&gt;Bio&#10;&lt;/h2&gt;&#10;&lt;p&gt;Wang Peng. BSc in Mathematics, MSc in Computer Science (a cross-discipline transition), currently a backend engineer at a bank&amp;rsquo;s headquarters (Beijing), working on core banking systems. Main interests: &lt;strong&gt;distributed architecture, unitized deployment, core banking domain modeling&lt;/strong&gt;, and the engineering adoption of AI in banking.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Credentials: PMP&lt;/li&gt;&#10;&lt;li&gt;Tech focus: Java backend, distributed systems, DDD / CQRS / Saga, enterprise architecture, data assets&lt;/li&gt;&#10;&lt;li&gt;Current focus: building a customer-facing AI Agent platform; evaluating enterprise Java AI frameworks (Spring AI 2.0 / LangChain4j / SAA / Embabel)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="experience"&gt;Experience&#10;&lt;/h2&gt;&#10;&lt;div class="td-table-scroll td-table-scroll--static"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th scope="col"&gt;Stage&lt;/th&gt;&#10; &lt;th scope="col"&gt;Detail&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Education&lt;/td&gt;&#10; &lt;td&gt;BSc Mathematics → MSc Computer Science (cross-discipline)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Current&lt;/td&gt;&#10; &lt;td&gt;Core banking systems engineer at a bank HQ&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Exam&lt;/td&gt;&#10; &lt;td&gt;Preparing for the senior «System Architect» certification&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;h2 id="tech-stack"&gt;Tech Stack&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;Java&lt;/code&gt; · &lt;code&gt;Spring Cloud&lt;/code&gt; · distributed transactions · unitization · &lt;code&gt;DDD&lt;/code&gt; · databases (&lt;code&gt;MySQL&lt;/code&gt; / sharding) · messaging &amp;amp; streams (&lt;code&gt;Kafka&lt;/code&gt;) · caching (&lt;code&gt;Redis&lt;/code&gt;) · coordination (&lt;code&gt;ZooKeeper&lt;/code&gt;) · microservice governance · enterprise architecture&lt;/p&gt;</description></item></channel></rss>