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

11 min read

Spring Boot @Transactional Pitfalls: Deadlocks, Long Transactions & Propagation Failures

This article analyzes three critical @Transactional pitfalls in Spring Boot 3.5.0: deadlocks from inconsistent lock ordering during concurrent transfers, long transactions holding row locks during external RPC calls causing blocking and inconsistency, and nested transaction propagation causing unexpected rollbacks despite try-catch. Solutions include consistent lock ordering, transaction splitting, and using REQUIRES_NEW or programmatic transactions.

8 min read

I Integrated AI into Our Java System in One Week — The Token Bill Almost Killed Me

A developer shares a week-long journey integrating AI into a Java customer service system, detailing how over-engineering with Spring AI Graph was replaced by a simple ChatClient + Tools approach, token costs were cut 80% via model routing, context compression, and semantic caching, a production latency spike was fixed with Tool result limits and circuit breakers, and three operational essentials — budget alerts, conversation logging, and a kill switch — were added for sustainability.

9 min read

PowerShell 7.6 Startup Crash: Negative PadRight Width in Localized Update Banner

PowerShell 7.6 crashes on startup for non-English locales because the update notification banner calculates a negative padding width when localized text is shorter than a fixed URL, triggering an unhandled ArgumentOutOfRangeException that calls Environment.FailFast; the workaround is setting POWERSHELL_UPDATECHECK=Off and restarting the terminal.

59 min read

Beyond API Calls: Master LLM Internals, KV Cache, RAG & Function Calling with Java

This comprehensive guide teaches backend engineers LLM fundamentals—from token prediction and attention mechanisms to KV Cache optimization—and provides production-ready Java code for token budgeting, SSE streaming, RAG, function calling, and agent loops, plus 14 real-world pitfalls and interview preparation.

14 min read

One @Trans Annotation Solves N+1 Queries and Data Translation in Spring Boot

This article introduces Easy-Trans, a Dromara open-source library that uses a single @Trans annotation to automatically handle five types of data translation—dictionary, simple join, cross-service RPC, enum, and custom—while eliminating N+1 queries through batch ID collection and single IN-clause or cache lookups, with configuration details and best practices for Spring Boot applications.

45 min read

Go Distributed Transactions in Production: Outbox, SAGA, TCC & Recovery Loops

This article details production-ready Go distributed transaction patterns including Outbox for reliable event publishing, RocketMQ transaction messages, SAGA orchestration with compensation, TCC resource reservation, payment unknown-state handling, capacity planning, fault validation matrices, and operational recovery loops with concrete PostgreSQL schemas and Go code examples.

16 min read

9 Proven Techniques to Solve Laravel Production Performance Problems

This article outlines nine practical methods for diagnosing and resolving Laravel performance issues in production, covering request measurement, N+1 query elimination, query plan optimization, memory-efficient data processing, strategic caching, queue offloading, external API timeouts, framework bootstrapping optimizations, and log/payload reduction, with code examples and a step-by-step diagnostic checklist.

22 min read

Build a Tamil Lyrics Search Engine from Scratch with Elasticsearch

This tutorial walks through building a Tamil-language lyrics search engine using Elasticsearch, covering data scraping with Scrapy, Elasticsearch installation and index creation, bulk data import via Python, custom analyzer configuration for Tamil text processing, and a comprehensive set of search query examples including match, multi_match, bool, range, wildcard, MLT, and aggregations.

12 min read

GC Pauses Break Redis Locks: How Fencing Tokens Prevent Stale Overwrites

The article explains how Redis distributed locks with TTL leases fail to prevent stale writes when a garbage collection pause delays a lock holder past its lease expiry, allowing a new holder to write fresh data that the original holder then overwrites upon resuming; it demonstrates why fencing tokens — incrementing sequence numbers issued atomically with lock grants and checked atomically at the storage layer via conditional updates — are necessary to reject obsolete writes.

19 min read

EF Core Deep Dive: Change Tracking, Query Optimization, Concurrency & Migration Strategies

This comprehensive guide explores EF Core's ChangeTracker internals, performance optimization techniques including AsNoTracking and compiled queries, optimistic concurrency with Timestamp tokens, production migration strategies using SQL scripts and bundles, and previews EF Core 10 LTS features like vector search and JSON support.

9 min read

Single Spring Boot Interface Serves Multiple Device Types with Dynamic Field Filtering

This article demonstrates how to build one Spring Boot 3.5.0 REST endpoint that automatically returns different JSON fields for desktop, mobile, tablet, and unknown clients by combining classpath scanning, a custom ResponseBodyAdvice, Jackson @JsonFilter, and YAUAA user-agent parsing.

18 min read

Go Team Overwhelmed by AI-Generated Vulnerability Reports: 10x Surge Forces New Triage Strategy

Go security team reports monthly vulnerability submissions jumped from 5–10 to 100–200, mostly false positives from AI tools; they respond with re-prioritization, LLM-assisted triage, and shift-left CI checks while refusing to adopt Linux's full-disclosure stance.

9 min read

Batch Processing Scheduling Architecture: Reliability Beyond Scheduled Triggers

This chapter distinguishes scheduling from batch execution, covering single-machine, cluster, distributed, and pipeline batch patterns, emphasizing reliability through state tracking, idempotency, sharding, checkpoints, and explicit dependencies over fixed timing. It also outlines practical platform capabilities like versioned task definitions, unique run instances, state machines, leases, business idempotency keys, resource quotas, and end-to-end reconciliation.

24 min read

Escaping the Distributed Monolith: Why Microservices Fail Without Domain Decoupling

A real e-commerce stress test reveals a distributed monolith where services are physically separated but logically coupled via shared databases, synchronous write chains, and shared domain models. The article dissects three coupling layers, control-plane risks, and an incremental decoupling strategy with an architectural review checklist.

27 min read

Observability Essentials: Three Pillars, Structured Logging, Distributed Tracing & Health Checks

Explores observability fundamentals including its three pillars (logs, metrics, tracing), structured logging with Serilog message templates, OpenTelemetry distributed tracing with W3C TraceContext propagation, ASP.NET Core health checks for Kubernetes liveness/readiness probes, and production monitoring architecture with correlation, standardization, sampling, and alerting strategies.

29 min read

ByteDance 2026 Linux Kernel Review: 198 Commits, Preemptible IPI, Dying Memcg Fixes

ByteDance's STE team details 198 accepted Linux kernel commits in 2026 H1, including making IPI waits preemptible to cut tail latency by 90%, solving dying memory cgroups with 33 patches, restructuring HugeTLB vmemmap optimization, accelerating large memory device initialization, and adding iomap fast paths for small direct I/O, plus extensive community review participation.

21 min read

How Virtual Threads Cut Latency from 50s to 1s in a Real Java 21 Service

The article details a real-world migration from a fixed 200-thread pool to Java 21 virtual threads, showing how serial calls to three 1-second external services caused 50-second tail latencies under load, and how virtual threads eliminated queuing by decoupling waiting from expensive OS threads, while covering pinning risks, ThreadLocal pitfalls, and migration steps.