Tagged articles
20 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Mar 10, 2025 · Backend Development

Postmortem of a Server Crash Caused by a Mis‑managed Scheduled Task in a Backend Module

The article analyzes a server outage triggered by a module that repeatedly created a scheduled task without proper lifecycle control, examines the problematic Java code, lists four key issues, presents a corrected implementation, and reflects on development, testing, review, and logging practices to prevent similar incidents.

BackendDebuggingIncident
0 likes · 5 min read
Postmortem of a Server Crash Caused by a Mis‑managed Scheduled Task in a Backend Module
Su San Talks Tech
Su San Talks Tech
Jan 14, 2025 · Backend Development

Mastering Dubbo’s Time Wheel: From Theory to Source Code

This article explains the concept and implementation of the time wheel in Dubbo, covering its use for scheduled retries, heartbeat handling, underlying HashedWheelTimer mechanics, configuration details, performance considerations, and related issues, providing a thorough guide for backend developers.

DubboFailbackHashedWheelTimer
0 likes · 22 min read
Mastering Dubbo’s Time Wheel: From Theory to Source Code
Architecture Digest
Architecture Digest
Jan 10, 2025 · Backend Development

Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal

This article explains how to protect time‑consuming business operations and critical data by designing a Redis‑based distributed lock using custom annotations, Spring AOP, and a ScheduledExecutorService that automatically extends the lock’s expiration to avoid premature release.

JavaScheduledExecutorServiceconcurrency
0 likes · 11 min read
Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal
IT Services Circle
IT Services Circle
Jan 7, 2025 · Backend Development

Replacing Thread.sleep Loops with Proper Scheduling in Java

The article explains why using Thread.sleep in a loop causes busy‑waiting and performance problems, and demonstrates several Java scheduling alternatives—including Timer/TimerTask, ScheduledExecutorService, wait/notify, and CompletableFuture—to efficiently check a flag at fixed intervals.

CompletableFutureJavaScheduledExecutorService
0 likes · 9 min read
Replacing Thread.sleep Loops with Proper Scheduling in Java
dbaplus Community
dbaplus Community
Jun 3, 2024 · Backend Development

Why Your ScheduledExecutorService Stops After an Exception—and How to Fix It

A mis‑handled exception in a ScheduledExecutorService can silently halt the entire scheduled thread pool, causing critical periodic jobs to stop; this article explains the underlying delay‑queue and thread‑pool mechanics, shows reproducible code, and provides practical safeguards to keep scheduled tasks alive.

DelayQueueJavaScheduledExecutorService
0 likes · 9 min read
Why Your ScheduledExecutorService Stops After an Exception—and How to Fix It
Java High-Performance Architecture
Java High-Performance Architecture
Apr 26, 2023 · Backend Development

How to Build a Robust Redis Distributed Lock with Spring AOP

This article explains why time‑consuming business operations need a distributed lock, walks through using Redis as a lock with Spring AOP, details the lock‑acquire, timeout, and renewal mechanisms, provides full code examples, testing steps, and best‑practice recommendations for reliable concurrency control in Java back‑end services.

JavaScheduledExecutorServiceconcurrency
0 likes · 12 min read
How to Build a Robust Redis Distributed Lock with Spring AOP
Java Architect Essentials
Java Architect Essentials
Nov 6, 2022 · Backend Development

Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java

This article explains how to design and implement a distributed lock using Redis, Spring AOP annotations, and a scheduled executor to automatically extend lock expiration, providing complete Java code examples, configuration details, testing procedures, and best‑practice recommendations for handling long‑running business operations safely.

ScheduledExecutorServiceSpring Bootaop
0 likes · 12 min read
Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java
Top Architect
Top Architect
Oct 20, 2022 · Backend Development

Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal

This article explains how to implement a Redis-based distributed lock in Spring Boot using custom annotations, AOP interception, and a scheduled executor to automatically renew lock expiration, providing a complete design, code examples, and testing guidance for handling long-running operations safely.

JavaScheduledExecutorServiceconcurrency
0 likes · 12 min read
Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal
Java High-Performance Architecture
Java High-Performance Architecture
Oct 18, 2022 · Backend Development

How to Implement a Robust Redis Distributed Lock with Spring AOP and Auto‑Renewal

This article explains the design and implementation of a Redis‑based distributed lock using Spring AOP, covering annotation creation, pointcut definition, lock acquisition, automatic renewal via a scheduled thread pool, error handling, and testing to ensure safe concurrent access to critical business data.

JavaScheduledExecutorServiceconcurrency
0 likes · 13 min read
How to Implement a Robust Redis Distributed Lock with Spring AOP and Auto‑Renewal
Top Architect
Top Architect
Oct 11, 2022 · Backend Development

Implementing Distributed Locks with Redis and AOP in Spring Boot

This article explains how to protect time‑consuming business operations by using Redis as a distributed lock together with Spring AOP, covering annotation design, aspect implementation, lock acquisition, automatic renewal via a scheduled executor, and practical testing examples.

JavaScheduledExecutorServiceSpring Boot
0 likes · 15 min read
Implementing Distributed Locks with Redis and AOP in Spring Boot
Code Ape Tech Column
Code Ape Tech Column
Sep 29, 2022 · Backend Development

Implementing a Redis Distributed Lock with AOP and Automatic Renewal in Spring Boot

This article explains how to protect time‑consuming business operations in a Spring Boot application by creating a custom @RedisLock annotation, using Redis as a distributed lock via AOP, implementing automatic lock renewal with a ScheduledExecutorService, and handling lock release and thread interruption.

JavaScheduledExecutorServiceSpring Boot
0 likes · 11 min read
Implementing a Redis Distributed Lock with AOP and Automatic Renewal in Spring Boot
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 18, 2020 · Backend Development

Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches

This article explains several ways to implement scheduled tasks in Java, covering the simple Timer class, the more robust ScheduledExecutorService, Spring's @Scheduled annotation, and distributed solutions using Redis ZSet and key‑space notifications, with code examples and practical considerations.

Distributed SchedulingJavaScheduled Tasks
0 likes · 16 min read
Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches