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

18 min read

Eino: ByteDance's Go-Native AI Framework for Production-Grade Agents

This article provides a comprehensive analysis of Eino, ByteDance's Go-native AI application framework, detailing its four-layer architecture, type-safe graph orchestration, automatic streaming handling, Agent runtime with ReAct loop, middleware support, interrupt/resume capabilities, code examples, comparison with LangChain, pros and cons, and recommended use cases for Go microservices.

23 min read

Memory Optimization Deep Dive: Allocate Less, Allocate Faster, Use Efficiently

This article presents a systematic approach to memory optimization across three dimensions—reducing allocation frequency, accelerating allocation speed, and improving memory usage efficiency—with practical C++ techniques including stack allocation, object pools, size-class allocators, huge pages, data structure packing, and false sharing prevention.

15 min read

CQRS in Practice: Why It's Not Just Database Read/Write Separation — Domain Model Decoupling Costs & Red Lines

The article explains CQRS as domain model separation rather than database read/write splitting, detailing command/query model boundaries, event-driven synchronization challenges, consistency trade-offs, engineering pitfalls like event reliability and view explosion, when to avoid CQRS, and a reference e-commerce order implementation with consistency-based query routing.

30 min read

Why MyBatis Second-Level Cache Returns Stale Data: Namespace Isolation Explained

This article explains why MyBatis second-level cache returns stale data, detailing first and second-level cache mechanics, cache key composition, write timing, namespace isolation issues, statement-level cache controls, Redis implementation, and conditions for safe cache usage.

21 min read

Java Agent Internals: Building Non-Invasive Profiling with Instrumentation & ASM

This article demonstrates how to build a Java Agent using the Instrumentation API and ASM for bytecode manipulation, covering premain/agentmain entry points, dynamic class redefinition via Attach API, and explores Arthas trace command's implementation using the bytekit framework for non-invasive method profiling.

31 min read

Go SIMD Deep Dive: Hardware, Compiler Intrinsics & 9x Dot Product Speedup

This article explores Go's new experimental SIMD packages (simd/archsimd and simd), explaining SIMD hardware concepts, vector register operations, common SIMD patterns like broadcast and fused multiply-add, compiler intrinsic mapping, and demonstrates a dot product implementation achieving 9x speedup over scalar code.

36 min read

From Redis INCR to Leaf-Segment: Reliable Short-Link ID Generation

This article analyzes short-link ID generation systems, comparing Redis INCR, database auto-increment, Leaf-segment, and Snowflake approaches, covering Base62 capacity planning, segment allocation with audit tables, dual-buffer prefetching, cache consistency for immediate readability, failure recovery protocols, and observability requirements for production-grade reliability.

17 min read

MyBatis Annotation-Based SQL Configuration: Complete Guide with Examples

This tutorial demonstrates how to configure MyBatis SQL statements using Java annotations instead of XML, covering Maven dependencies, project structure, core configuration files, entity mapping, dynamic SQL providers, mapper interfaces with @Select/@Insert/@Update/@Delete annotations, service layer implementation, and JUnit testing.

31 min read

How Zhihu Built DBAgent: An AI Agent Architecture for Trustworthy Database Operations

Zhihu's DBAgent employs Deep Agents for dynamic planning, modular DB Skills for codified runbooks, and A2A protocol for task management to orchestrate real-time database operations across MySQL, TiDB, OceanBase, and Redis with human-in-the-loop governance and full audit trails.

25 min read

Claude User Profiles: Per-Client Enforcement Only on Platforms Verifying IDs Per Request

Anthropic's user profiles shift enforcement from organization to end-client level, but only on platforms that verify profile IDs per request; gateways must create profiles at registration, store IDs on customer records, inject headers at the sole egress point, and handle platform-specific gaps like Bedrock's format-only validation and AWS's missing enforcement reporting.

12 min read

Linus Torvalds & Claude Code Fix Kernel Cache Contention, But Race Condition Found

Linus Torvalds, after calling AI 90% hype, used Claude Code to implement an RCU-based fix for Linux kernel page cache contention that tripled throughput and cut cache-line bouncing by 99.6%, but kernel reviewers discovered a subtle race condition causing silent data corruption, requiring a human rewrite.

36 min read

Spring Boot Graceful Shutdown & Health Checks: Zero-Downtime Deployment Deep Dive

This comprehensive guide dissects Spring Boot's graceful shutdown internals and health check semantics, revealing why configuring server.shutdown=graceful alone fails to prevent request loss during Kubernetes rolling updates, and provides a complete framework for coordinating shutdown phases, probe groups, and routing convergence to achieve true zero-downtime deployments.

53 min read

Building a Spring Boot Starter from Scratch: Auto-Configuration, Conditional Assembly & Rate-Limiter Example

This comprehensive guide walks through creating a production-ready Spring Boot 3.x starter, covering auto-configuration mechanics, conditional annotations, configuration properties, registration files, and a complete token-bucket rate-limiter implementation with AOP, plus debugging tips and common pitfalls.

7 min read

Process Orchestration: The Survival Skill for Multi-Business Backend Systems

The article explains why process orchestration is essential for backend systems serving multiple business lines, demonstrating a flow engine with process, success, rollback, and callback nodes that eliminates if-else chains, ensures code isolation, and enables safe extension, with code examples and a Git repository reference.

11 min read

High-Performance Local Cache Solutions Compared: Guava, Caffeine, Ehcache & ConcurrentHashMap

This article compares four Java local caching solutions — ConcurrentHashMap, Guava Cache, Caffeine, and Ehcache — detailing their features, performance characteristics, and code examples, while addressing cache consistency challenges in two-level cache architectures using MQ or Canal for synchronization.

14 min read

Spring Circular Dependencies: Why Field Injection Works But Constructor Injection Fails

This article explains Spring's three-level cache mechanism that resolves circular dependencies for field/setter injection, why constructor injection fails with BeanCurrentlyInCreationException, how early exposure and ObjectFactory enable AOP proxy creation, and the impact of Spring Boot 2.6's default circular reference blocking.

63 min read

Beyond Handlers: Reliable Order Services with Kratos — Layering, Idempotency, Consistency & Capacity Governance

This article details how to build a production-grade order service using Kratos v2, MySQL, Kafka, and Kubernetes, covering idempotency keys, outbox pattern, inventory reservation, state machines, context/timeouts, middleware, observability, Kubernetes probes, capacity planning for 8000 QPS, and automated fault-injection tests.

51 min read

Agent Observability: From Traces to Task Failure Attribution — Production Design with Go, Java, OpenTelemetry & Kubernetes

This article presents a production-grade observability design for agent systems, covering task modeling, trace propagation, lease/fencing/checkpoint mechanisms, OpenTelemetry instrumentation in Go and Java, MCP integration, Kubernetes collector setup, PromQL dashboards, Argo CD release correlation, and fault injection experiments for failure attribution.