Shepherd Advanced Notes
Author

Shepherd Advanced Notes

Dedicated to sharing advanced Java technical insights, daily work snippets, and the power of persistent effort.

127
Articles
0
Likes
403
Views
0
Comments
Recent Articles

Latest from Shepherd Advanced Notes

100 recent articles max
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 16, 2023 · Backend Development

How to Elegantly Implement Dynamic, Configurable, High‑Performance Data Desensitization in Spring Boot

The article explains why user privacy data must be masked, then walks through a Spring Boot solution that uses custom annotations, an aspect‑oriented filter, a contextual serializer and a flexible rule engine stored in Redis to achieve dynamic, high‑performance data desensitization without polluting business logic.

Custom AnnotationJacksonJava
0 likes · 18 min read
How to Elegantly Implement Dynamic, Configurable, High‑Performance Data Desensitization in Spring Boot
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 12, 2023 · Backend Development

Using Zookeeper for Middleware: Implementing Distributed Locks and Service Registry in Spring Boot

This article explains Zookeeper's role as an open‑source distributed coordination service, covering its observer‑pattern design, data model, installation (single‑node and cluster), leader election, watcher mechanism, and demonstrates how to integrate Zookeeper as a service registry and distributed lock in Spring Boot using Curator, complete with code examples.

Distributed LockLeader ElectionSpring Boot
0 likes · 25 min read
Using Zookeeper for Middleware: Implementing Distributed Locks and Service Registry in Spring Boot
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 10, 2023 · Backend Development

Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code

This article enumerates and explains sixteen Spring and SpringBoot extension interfaces, illustrates their positions in the bean lifecycle with a call‑order diagram, and provides concrete usage scenarios and code samples so developers can harness these hooks to write more elegant and maintainable applications.

BackendBean LifecycleDependency Injection
0 likes · 19 min read
Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 29, 2023 · Backend Development

How to Cut API Latency from 5 s to 0.5 s with CompletableFuture Async Optimizations

The article explains how to dramatically reduce the response time of an API that must call multiple downstream services by converting serial calls into parallel ones using Java 8's CompletableFuture, covering its relationship to Future, core APIs, task composition, exception handling, and practical best‑practice recommendations.

Asynchronous ProgrammingCompletableFutureConcurrency
0 likes · 20 min read
How to Cut API Latency from 5 s to 0.5 s with CompletableFuture Async Optimizations
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 19, 2023 · Backend Development

How Douyin Implements IP Geolocation: A Java Backend Tutorial

This article explains how to retrieve a client’s real IP behind proxies, choose the appropriate forwarding header, and use the open‑source ip2region library to map the IP to a geographic location, with complete Java and Spring Boot code examples.

HttpServletRequestIP GeolocationJava
0 likes · 17 min read
How Douyin Implements IP Geolocation: A Java Backend Tutorial
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 15, 2023 · Backend Development

How to Prevent Duplicate Order Submissions in Flash‑Sale Systems: An Idempotency Guide

The article explains the concept of idempotency, outlines common duplicate‑submission scenarios such as form resubmission, malicious voting, client retries, and message re‑consumption, and details three practical implementation methods—database constraints, token‑based middleware, and state‑machine logic—complete with code examples and trade‑off considerations.

Backend DevelopmentIdempotencyOptimistic Lock
0 likes · 13 min read
How to Prevent Duplicate Order Submissions in Flash‑Sale Systems: An Idempotency Guide
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 1, 2023 · Big Data

Visual Guide to Kafka’s Architecture and Core Principles

This article explains Kafka’s architecture in depth, covering components such as producers, consumers, topics, partitions, replication, Zookeeper coordination, the Controller’s election and responsibilities, state machines, and the NIO‑based network model, using clear diagrams and analogies.

ControllerKafkaNetwork Model
0 likes · 14 min read
Visual Guide to Kafka’s Architecture and Core Principles
Shepherd Advanced Notes
Shepherd Advanced Notes
Aug 30, 2023 · Databases

Achieving Efficient Real‑Time Search for Massive Data in Spring Boot Applications

The article analyzes why massive tables become a bottleneck in Spring Boot systems, outlines the drawbacks of sharding, and presents a layered solution—data archiving, read‑write separation with caching, heterogeneous source synchronization via Elasticsearch and Canal, and selective sharding—to enable high‑performance real‑time search.

CanalData ArchivingElasticsearch
0 likes · 13 min read
Achieving Efficient Real‑Time Search for Massive Data in Spring Boot Applications