Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Backend Development

19 min read

Strangler Fig Pattern: Incremental Monolith-to-Microservices Migration Without Big-Bang Rewrite

This article details the Strangler Fig Pattern for migrating legacy monoliths to microservices, using a facade layer, dual-write with local message tables, traffic mirroring, and one-click rollback, illustrated with a 14-month retail migration and the TSB bank failure case.

13 min read

Enterprise Core Architecture Design: 4 Case Studies & Layered Derivation Method

This article summarizes Chapter 13 of 'Architecture Fundamentals', presenting four enterprise system case studies—messaging platform, fund collection/payment, business monitoring, and regulatory reporting—to demonstrate a layered architecture derivation method covering functional architecture, service relationships, technical deployment, data design, and process flows, with practical checklists for responsibility, state visibility, failure recovery, and traceability.

30 min read

Feeder Pipelines: Bridging Offline Data Factory to Online Recommendation Engine

This article details Feeder pipelines that transport diverse data types—user features, content tags, embeddings, popularity rankings, and operational rules—from offline computation to online serving, covering batch atomic switches, NRT incremental updates, cursor-based recovery, scheduling platform design, and latency observability practices.

11 min read

Google Guava Deep Dive: Fluent Strings, Immutable Collections, and Local Caching

This article explores Google Guava's core utilities for Java developers, demonstrating how Joiner, Splitter, and CharMatcher simplify string handling, how Immutable collections provide true immutability versus JDK's unmodifiable views, and how Multimap, BiMap, and Table solve common collection gaps. It also covers primitive utilities, functional transforms with Functions and Predicate, null-safety via Preconditions and Optional, a self-maintaining local Cache, and ListenableFuture for cleaner async callbacks.

10 min read

Why Thread Pools Leak User Data: ThreadLocal Internals and Solutions

This article explains how a static ThreadLocal without cleanup in a thread pool causes user data leakage and memory leaks, details ThreadLocalMap's weak-reference Entry structure, demonstrates InheritableThreadLocal's failure with pooled threads, and presents solutions including try-finally cleanup, interceptor-based clearing, Alibaba's TransmittableThreadLocal, and an AutoCloseable wrapper for safe scoping.

15 min read

ACP v2: Prompt Response Success Only Confirms Message Insertion, Not Turn Completion

The article explains how ACP v2 decouples message insertion from turn completion, making session/prompt responses only acknowledge insertion while deferring completion, errors, and cancellations to session-level state_update notifications, requiring clients to maintain separate tracking for submission receipt and session activity.

39 min read

High-Performance Order Book Maintenance: Incremental Sync, Data Structures & Benchmarks

This article details local order book maintenance covering incremental WebSocket depth updates, REST snapshot alignment, price quantization to integers, and compares BTreeMap, sorted Vec, flat arrays with bitmap indexing, and RingBuffer implementations with benchmark results on Apple M4 Pro showing array-based structures achieve 4-5ns updates vs 34ns for BTreeMap.

42 min read

Spring AI + Milvus: Enterprise RAG Production Engineering – Verifiable Knowledge, Permissions, Capacity & Recovery

This article presents a production-grade RAG engineering methodology using Spring AI and Milvus, covering version baselines, capacity planning, security filters, schema design, retrieval quality, prompt injection defense, knowledge versioning, Milvus topology, concurrency control, caching, SSE streaming, observability, fault injection testing, and a minimal first-week delivery checklist.

21 min read

Why WebSocket Broadcast Fails at 1M Viewers: Solving Massive Fan-Out in Live Chat

This article analyzes why naive WebSocket broadcast fails for million-viewer live chat due to bandwidth and client rendering limits, then presents a three-layer architecture with local fan-out, 100ms batching windows, priority-based sampling, and segmented sequence generation to reduce remote pushes from millions to dozens while maintaining perceived real-time experience.

10 min read

Before AI Refactors Legacy Code: Lock Down These Behaviors First

The article outlines a safe approach for AI-assisted legacy refactoring: define behavioral baselines with stakeholders, capture repeatable test samples covering normal and edge cases, compare old and new outputs in isolation, refactor incrementally with continuous regression, and verify rollback compatibility for data and interfaces.

9 min read

Free DeepSeek V4.1 Flash 1017 via Magpie Gateway: One-Click Setup for Any Coding Agent

This tutorial shows how to use the open-source Magpie gateway to aggregate free DeepSeek V4.1 Flash 1017 quotas from OpenCode Zen Free, Tencent Cloud WorkBuddy, and ByteDance Trae CN, enabling zero-cost integration with coding agents like Claude Code, Codex, and DeepSeek Harness via automatic protocol translation and multi-account failover.

18 min read

Go's http.Server Exposes Internal Middleware via HandleRequest for HTTP/3

Go proposal #77441 adds Server.HandleRequest to net/http, exposing internal request-processing middleware (OPTIONS *, DefaultServeMux fallback, panic recovery) so HTTP/3 and other protocol implementations can reuse standard library behavior without code duplication, while also enabling full-server integration testing.

41 min read

Spring Boot Deep Dive: Auto-Configuration, Startup Flow & Source Code Analysis

This comprehensive guide dissects Spring Boot's core mechanisms including auto-configuration internals, the nine-step startup process from main() to port binding, embedded Tomcat initialization, configuration binding, and fat JAR loading, with source code references and a structured learning path for mastering the framework.

9 min read

Configuration Architecture Design: Storage, Multi-level Caching & Multi-tenant Governance

This chapter explores system configuration architecture design, covering storage and loading strategies, multi-level caching, distributed configuration centers, dictionary management, multi-tenant configuration hierarchies, and governance practices including versioning, auditing, canary releases, and historical snapshot preservation for auditability.

20 min read

Tomcat 11 Deep Dive: Virtual Threads, Servlet 6.1, EL 6.0, and Migration Guide

This article explores Tomcat 11's major upgrades including Java 17 baseline, Jakarta EE 11 alignment, virtual threads for high concurrency, Servlet 6.1 API improvements, EL 6.0 record support, removed legacy features, and provides hands-on Docker and embedded deployment examples with code.