Programmer XiaoFu
Author

Programmer XiaoFu

xiaofucode.com – a programmer learning guide driven by the pursuit of profit

108
Articles
0
Likes
140
Views
0
Comments
Recent Articles

Latest from Programmer XiaoFu

100 recent articles max
Programmer XiaoFu
Programmer XiaoFu
Jul 16, 2026 · Backend Development

Can Java 21 Virtual Threads Replace CompletableFuture for Async Programming?

With Java 21’s virtual threads making threads cheap, the article examines whether the traditional CompletableFuture async style can be dropped, showing that simple IO can now be written synchronously, while complex task orchestration, fallback, and timeout still benefit from CompletableFuture’s richer API.

Async ProgrammingCompletableFutureJava
0 likes · 10 min read
Can Java 21 Virtual Threads Replace CompletableFuture for Async Programming?
Programmer XiaoFu
Programmer XiaoFu
Jun 25, 2026 · Backend Development

Why Delayed Double Delete Fails to Ensure Cache Consistency Under High Concurrency

The article dissects the delayed double‑delete pattern for Redis‑MySQL consistency, exposing its hidden pitfalls—unreliable delay timing, thread‑blocking sleeps, fragile second‑delete retries, and concurrent‑write anomalies—then recommends cache‑aside and stronger alternatives for production systems.

Cache ConsistencyDelayed Double DeleteMySQL
0 likes · 7 min read
Why Delayed Double Delete Fails to Ensure Cache Consistency Under High Concurrency
Programmer XiaoFu
Programmer XiaoFu
Jun 23, 2026 · Backend Development

Why Kafka Still Delivers Out‑of‑Order Messages Even When Using the Same Key

Even though Kafka guarantees that messages with the same key land in the same partition, the article explains how producer retries, multithreaded consumer processing, and partition expansion can break ordering, and provides concrete techniques such as idempotent producers and single‑threaded consumption to preserve order.

Consumer ConcurrencyKafkaMessage Ordering
0 likes · 10 min read
Why Kafka Still Delivers Out‑of‑Order Messages Even When Using the Same Key
Programmer XiaoFu
Programmer XiaoFu
Jun 18, 2026 · Cloud Native

Why Use Service Registration When Nginx Already Handles Load Balancing?

The article explains that Nginx’s static upstream configuration and passive health checks cannot keep up with dynamic microservice environments, while a service registry provides real‑time instance awareness, automatic failure detection, and metadata‑driven routing, making both tools complementary rather than interchangeable.

EurekaKubernetesNacos
0 likes · 9 min read
Why Use Service Registration When Nginx Already Handles Load Balancing?
Programmer XiaoFu
Programmer XiaoFu
Jun 17, 2026 · Information Security

Why JWT Requires Both Access and Refresh Tokens Instead of a Single Token

The article explains the inherent trade‑off of a single JWT’s expiration time, shows how using short‑lived Access Tokens together with long‑lived Refresh Tokens resolves both security and user‑experience issues, and provides detailed backend and frontend implementation guidance.

AuthenticationJWTOAuth 2.0
0 likes · 11 min read
Why JWT Requires Both Access and Refresh Tokens Instead of a Single Token
Programmer XiaoFu
Programmer XiaoFu
Jun 16, 2026 · R&D Management

Why Faster AI Coding Still Leaves Developers More Exhausted

Although AI tools like Copilot and Cursor can cut coding time from five days to three, the saved time is quickly filled with additional tasks, leading to higher output expectations, increased technical debt, and greater mental fatigue for developers, as organizations reap the productivity gains without reducing individual workload.

AI toolsautomationdeveloper productivity
0 likes · 8 min read
Why Faster AI Coding Still Leaves Developers More Exhausted
Programmer XiaoFu
Programmer XiaoFu
Jun 15, 2026 · Backend Development

Why a Simple Redis Mutex Lock Isn’t Enough for Cache Breakdown – When to Use Never‑Expire or Logical Expiration

The article analyzes why a basic Redis mutex lock can cause thread blocking, latency spikes, and service collapse under high concurrency, and compares it with logical expiration and never‑expire with proactive updates, explaining their trade‑offs and how to choose the right cache‑breakdown mitigation strategy.

CacheJavaLogical Expiration
0 likes · 12 min read
Why a Simple Redis Mutex Lock Isn’t Enough for Cache Breakdown – When to Use Never‑Expire or Logical Expiration