Tagged articles
2072 articles
Page 16 of 21
Java Captain
Java Captain
Nov 7, 2020 · Backend Development

Why Use Distributed Locks? Implementations with Redis and Zookeeper

The article explains the stock‑oversell problem in a single‑machine e‑commerce system, shows why native Java locks fail in multi‑node deployments, and then details practical distributed‑lock solutions using Redis (including SET NX PX, Lua‑based release, RedLock algorithm and Redisson) and Zookeeper (ephemeral sequential nodes and Curator), before comparing their advantages, drawbacks, and offering selection guidance.

ZooKeeperconcurrencydistributed-lock
0 likes · 17 min read
Why Use Distributed Locks? Implementations with Redis and Zookeeper
FunTester
FunTester
Nov 5, 2020 · Operations

How to Implement Fixed‑QPS Load Testing and Fix Common Bugs

This article explains a practical fixed‑QPS load‑testing model for HTTP requests, provides reusable Java code for creating test tasks, and details two bug fixes—one for thread‑pool shutdown handling in asynchronous compensation threads and another for inaccurate request‑counting that caused over‑compensation.

Load Testingbug fixconcurrency
0 likes · 7 min read
How to Implement Fixed‑QPS Load Testing and Fix Common Bugs
Alibaba Cloud Developer
Alibaba Cloud Developer
Nov 5, 2020 · Fundamentals

Why Understanding JVM Garbage Collection Algorithms Is Essential for Advanced Java Developers

This article explores the underlying principles of Java Virtual Machine garbage collection, detailing core concepts, classic algorithms, generational and incremental improvements, and the role of read/write barriers, helping developers grasp why mastering GC is a fundamental skill for high‑performance Java programming.

GC AlgorithmsGarbage CollectionJVM
0 likes · 26 min read
Why Understanding JVM Garbage Collection Algorithms Is Essential for Advanced Java Developers
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 2, 2020 · Backend Development

Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport

This article presents various Java solutions for common interview multithreading problems that require sequential printing, demonstrating implementations using Lock, wait/notify, Condition, Semaphore, and LockSupport, along with detailed code examples and explanations of thread communication mechanisms.

Lockconcurrencyjava
0 likes · 15 min read
Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport
Programmer DD
Programmer DD
Oct 30, 2020 · Backend Development

Why Reactive Programming Is the Future of High-Concurrency Java Development

This article explains how reactive programming, introduced by Microsoft in 2009 and adopted by Java through frameworks like RxJava and Spring Reactor, addresses high‑concurrency server‑side challenges, clarifies concepts such as backpressure, and compares Reactor with RxJava for modern backend engineers.

RxJavaSpring Reactorbackpressure
0 likes · 13 min read
Why Reactive Programming Is the Future of High-Concurrency Java Development
Architecture Digest
Architecture Digest
Oct 20, 2020 · Backend Development

Deep Dive into Java ThreadPoolExecutor: Creation, Task Execution, and Shutdown Mechanisms

This article provides an in‑depth analysis of Java's ThreadPoolExecutor, explaining how Executors' factory methods create pools, detailing the constructor parameters, internal state management, task submission via execute, worker thread lifecycle, and the differences between shutdown and shutdownNow, with code excerpts for clarity.

ExecutorsShutdownThreadPool
0 likes · 19 min read
Deep Dive into Java ThreadPoolExecutor: Creation, Task Execution, and Shutdown Mechanisms
Top Architect
Top Architect
Oct 14, 2020 · Fundamentals

Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation

This article provides a comprehensive analysis of the HotSpot JVM implementation of the synchronized keyword, covering object header layout, the three lock states (biased, lightweight, heavyweight), their acquisition and release processes, bytecode differences, and practical code examples to help readers understand Java concurrency internals.

JVMObject Headerconcurrency
0 likes · 16 min read
Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation
FunTester
FunTester
Oct 13, 2020 · Operations

How to Build a Fixed‑QPS Load‑Testing Framework in Java

This article explains the design and implementation of a Java‑based fixed QPS load‑testing framework, covering its multithreaded base class, concurrent executor, compensation thread, performance metrics collection, and provides source code links for practical use and further development.

Load Testingconcurrencyfixed QPS
0 likes · 8 min read
How to Build a Fixed‑QPS Load‑Testing Framework in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 12, 2020 · Fundamentals

Ordered Thread Execution in Java: join, CountDownLatch, Single Thread Pool, and CompletableFuture

This article explains how to enforce a specific execution order among three Java threads—first thread 1, then thread 2, and finally thread 3—using four techniques: the join method, CountDownLatch, a single‑thread executor, and CompletableFuture, each illustrated with complete code examples.

CompletableFutureCountDownLatchJOIN
0 likes · 6 min read
Ordered Thread Execution in Java: join, CountDownLatch, Single Thread Pool, and CompletableFuture
Selected Java Interview Questions
Selected Java Interview Questions
Oct 7, 2020 · Fundamentals

In-depth Overview of Java HashMap and ConcurrentHashMap: Structure, Operations, and Performance

This article provides a comprehensive explanation of Java's HashMap and ConcurrentHashMap implementations, covering their internal data structures, hashing mechanisms, load factor, resizing process, collision handling, and the differences between JDK 1.7 and 1.8, along with practical interview questions and code examples.

BackendConcurrentHashMapHashMap
0 likes · 15 min read
In-depth Overview of Java HashMap and ConcurrentHashMap: Structure, Operations, and Performance
Xianyu Technology
Xianyu Technology
Sep 27, 2020 · Backend Development

Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration

The article presents a design for an asynchronous component that is monitorable, fault‑tolerant, and integrates with zero overhead, compares Akka, RxJava, and a custom JUC‑based implementation, and selects the latter—using extended Callables and a CountDownLatch—to track business units, handle timeouts, and provide fallback behavior.

AsynchronousJUCconcurrency
0 likes · 8 min read
Design of an Asynchronous Component with Monitoring, Fault Tolerance, and Zero‑Cost Integration
Programmer DD
Programmer DD
Sep 25, 2020 · Backend Development

How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems

This article analyzes a real‑world incident where duplicate order IDs appeared under high concurrency, critiques the original Java implementation, demonstrates a concurrency test that exposed the flaw, and presents a revised, thread‑safe solution using AtomicInteger, Java 8 date‑time APIs, and IP‑based suffixes to guarantee uniqueness across multiple instances.

DistributedUnique IDconcurrency
0 likes · 11 min read
How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems
Youzan Coder
Youzan Coder
Sep 23, 2020 · Backend Development

Why Did My Dubbo Thread Pool Deadlock? A Deep Dive into CompletableFuture Blocking

The article analyzes a production incident where a Dubbo thread pool exhausted its threads due to CompletableFuture#join blocking, explains how the custom business thread pool caused mutual waiting, and presents a solution that isolates asynchronous tasks into a separate pool to restore service stability.

BackendCompletableFutureDubbo
0 likes · 9 min read
Why Did My Dubbo Thread Pool Deadlock? A Deep Dive into CompletableFuture Blocking
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 22, 2020 · Backend Development

Understanding AtomicInteger, CAS, and Lock‑Free Concurrency in Java

This article explains how Java's AtomicInteger and related atomic classes provide lock‑free thread‑safe operations to replace non‑atomic constructs like i++, detailing their inheritance, underlying Unsafe mechanisms, CAS implementation, memory barriers, optimistic locking, the ABA problem, and practical code examples for increment, decrement, and custom CAS‑based locks.

AtomicIntegerCASOptimisticLocking
0 likes · 15 min read
Understanding AtomicInteger, CAS, and Lock‑Free Concurrency in Java
macrozheng
macrozheng
Sep 22, 2020 · Fundamentals

Master Java Multithreading: Why, How, and Common Pitfalls Explained

This article introduces the fundamentals of Java multithreading, explaining why concurrency is needed, the differences between programs, processes and threads, four ways to create threads, and common pitfalls such as thread safety and deadlocks, all with clear code examples.

concurrencyjavamultithreading
0 likes · 10 min read
Master Java Multithreading: Why, How, and Common Pitfalls Explained
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 21, 2020 · Backend Development

Understanding Java Thread Pools: Concepts, Benefits, and Usage

This article explains Java thread pools, covering their purpose, advantages, core components, constructor parameters, built‑in pool types such as Cached, Fixed and Single thread pools, and the available rejection policies, providing code examples and practical guidance for efficient multithreaded programming.

ExecutorServiceThreadPoolconcurrency
0 likes · 11 min read
Understanding Java Thread Pools: Concepts, Benefits, and Usage
Selected Java Interview Questions
Selected Java Interview Questions
Sep 20, 2020 · Backend Development

Comprehensive Guide to Java Multithreading: Concepts, APIs, and Best Practices

This article provides an in‑depth overview of Java multithreading, covering fundamental concepts such as processes, threads, parallelism vs concurrency, thread creation methods, lifecycle states, synchronization mechanisms, memory model nuances, lock implementations, common pitfalls like deadlocks, and practical usage of thread pools with best‑practice recommendations.

CASJMMThreadPool
0 likes · 39 min read
Comprehensive Guide to Java Multithreading: Concepts, APIs, and Best Practices
vivo Internet Technology
vivo Internet Technology
Sep 16, 2020 · Backend Development

How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals

This article explains the fundamentals of HashMap, then dissects the internal fields, node‑array safety, read‑path guarantees, write‑path locking, atomic compute methods, resize‑transfer mechanics, traverser design, and bulk‑task support that together make Java's ConcurrentHashMap (C13Map) a highly concurrent, lock‑free data structure.

ConcurrentHashMapData StructuresHashMap
0 likes · 49 min read
How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals
Senior Brother's Insights
Senior Brother's Insights
Sep 15, 2020 · Fundamentals

Why Is StringBuilder Not Thread‑Safe? Deep Dive into Java’s Internals

Although StringBuilder and StringBuffer share similar APIs, StringBuilder lacks thread safety because its append method updates shared fields without synchronization, leading to race conditions that can corrupt the internal char array and cause ArrayIndexOutOfBoundsException, as demonstrated by a multithreaded test example.

JVMconcurrencyjava
0 likes · 7 min read
Why Is StringBuilder Not Thread‑Safe? Deep Dive into Java’s Internals
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 14, 2020 · Fundamentals

Java Thread Lifecycle and Common Thread APIs

This article explains Java's thread lifecycle, detailing its six states—New, Runnable, Blocked, Waiting, Timed_waiting, and Terminated—and describes eleven commonly used thread APIs such as join(), wait(), notify(), yield(), sleep(), currentThread(), getName(), getId(), getPriority(), setPriority() and stop().

APIThreadconcurrency
0 likes · 9 min read
Java Thread Lifecycle and Common Thread APIs
21CTO
21CTO
Sep 12, 2020 · Fundamentals

Why Distributed Systems Mirror Single‑Node Concurrency and How to Avoid Common Pitfalls

This article explains how concurrency issues that appear in single‑threaded programs become amplified in distributed systems, covering consistency models, network reliability, clock synchronization, fault detection, backpressure, and cascading failures, and offers practical design and testing strategies to build resilient architectures.

Consistencyconcurrencyfault tolerance
0 likes · 19 min read
Why Distributed Systems Mirror Single‑Node Concurrency and How to Avoid Common Pitfalls
StarRing Big Data Open Lab
StarRing Big Data Open Lab
Sep 11, 2020 · Databases

Why Memory Databases Outperform Disk‑Based Systems: Key Technologies Explained

This article examines the fundamental differences between traditional disk‑based DBMS and modern in‑memory databases, covering buffer management, lock versus latch mechanisms, logging and recovery, performance overhead, historical evolution, and architectural innovations that enable high‑performance memory‑resident data processing.

DBMSconcurrencydatabases
0 likes · 18 min read
Why Memory Databases Outperform Disk‑Based Systems: Key Technologies Explained
Wukong Talks Architecture
Wukong Talks Architecture
Sep 9, 2020 · Fundamentals

Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations

This article provides an in‑depth, illustrated overview of Java's Queue hierarchy, covering 18 concrete queue classes, their inheritance relationships, core methods, blocking and non‑blocking variants, practical usage examples, and code snippets to help developers master queue-based data structures and concurrency utilities.

BlockingQueueData StructuresQueue
0 likes · 26 min read
Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations
Top Architect
Top Architect
Sep 4, 2020 · Fundamentals

Understanding the volatile Keyword and Thread Synchronization in Java

This article explains how the volatile keyword ensures visibility of shared variables across threads, illustrates its behavior with examples and code, discusses its limitations regarding atomicity, and presents solutions using synchronized blocks or atomic classes for proper thread synchronization in Java.

Synchronizationatomicconcurrency
0 likes · 8 min read
Understanding the volatile Keyword and Thread Synchronization in Java
Liangxu Linux
Liangxu Linux
Sep 3, 2020 · Fundamentals

Understanding Processes and Threads: A Factory Analogy for OS Fundamentals

This article explains core operating system concepts—CPU as a factory, the static nature of programs versus dynamic processes, how threads act as workers on production lines, and synchronization mechanisms like mutexes and semaphores, using clear analogies and diagrams.

Operating SystemSynchronizationThread
0 likes · 8 min read
Understanding Processes and Threads: A Factory Analogy for OS Fundamentals
macrozheng
macrozheng
Sep 3, 2020 · Backend Development

Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues

This article provides a comprehensive overview of Java's concurrent queue implementations, explaining the differences between blocking and non‑blocking queues, their underlying mechanisms, typical use‑cases, and code examples for classes such as ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue, DelayQueue, SynchronousQueue, LinkedTransferQueue, and LinkedBlockingDeque.

BlockingQueueJUCThreadPool
0 likes · 16 min read
Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues
Wukong Talks Architecture
Wukong Talks Architecture
Sep 2, 2020 · Fundamentals

Comprehensive Overview of Java Locks and Concurrency Mechanisms

This article provides a detailed guide to various Java lock types—including optimistic, pessimistic, spin, reentrant, read‑write, fair, unfair, shared, exclusive, heavyweight, lightweight, biased, segment, mutex, synchronization, deadlock, lock coarsening, and lock elimination—explaining their principles, typical usages, advantages, disadvantages, and related JVM optimizations.

Locksconcurrencyjava
0 likes · 17 min read
Comprehensive Overview of Java Locks and Concurrency Mechanisms
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 2, 2020 · Backend Development

Understanding Java Concurrency: Synchronized Containers, OS Concurrency Tools, and Java Concurrency Utilities

This article provides a comprehensive overview of Java concurrency, covering synchronized container classes, operating‑system level synchronization primitives, and the rich set of concurrent utilities introduced in the Java standard library, with code examples and explanations of fail‑fast and fail‑safe mechanisms.

ConcurrentUtilitiesSynchronizedContainersThreadSafety
0 likes · 38 min read
Understanding Java Concurrency: Synchronized Containers, OS Concurrency Tools, and Java Concurrency Utilities
Top Architect
Top Architect
Sep 1, 2020 · Backend Development

Improving Order Number Generation to Avoid Duplicates in High‑Concurrency Java Applications

The article analyzes a real‑world incident where duplicate order IDs were generated under high concurrency, demonstrates the shortcomings of the original Java implementation, and presents a thread‑safe redesign using AtomicInteger, Java 8 date‑time API and container IP suffix to guarantee unique identifiers across parallel requests and clustered instances.

BackendDistributed Systemsconcurrency
0 likes · 11 min read
Improving Order Number Generation to Avoid Duplicates in High‑Concurrency Java Applications
Wukong Talks Architecture
Wukong Talks Architecture
Aug 31, 2020 · Fundamentals

Understanding Thread Safety Issues in Java Collections: ArrayList, HashSet, HashMap and Their Solutions

This article explains why core Java collection classes such as ArrayList, HashSet, and HashMap are not thread‑safe, demonstrates the underlying mechanisms of their initialization and resizing, and presents multiple approaches—including Vector, synchronized wrappers, and CopyOnWrite variants—to achieve safe concurrent access.

ArrayListHashMapconcurrency
0 likes · 16 min read
Understanding Thread Safety Issues in Java Collections: ArrayList, HashSet, HashMap and Their Solutions
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 26, 2020 · Backend Development

Testing Volatile Thread Safety and Comparing LongAdder vs AtomicInteger Performance in Java

This article examines the thread‑safety of the volatile keyword under multi‑write scenarios, demonstrates its failure with a concurrent counter test, and benchmarks LongAdder against AtomicInteger using JMH, revealing LongAdder’s superior performance under high contention and AtomicInteger’s advantage in low‑contention environments.

AtomicIntegerJMHconcurrency
0 likes · 8 min read
Testing Volatile Thread Safety and Comparing LongAdder vs AtomicInteger Performance in Java
21CTO
21CTO
Aug 25, 2020 · Backend Development

Go vs Java: Which Language Wins for Modern Backend Development?

The article shares a developer’s firsthand comparison of Java and Go, covering their histories, syntax, garbage collection, concurrency models, reflection, inheritance, dependency management, and practical pros and cons, to help readers decide which language better fits their backend projects.

Goconcurrencyjava
0 likes · 15 min read
Go vs Java: Which Language Wins for Modern Backend Development?
MaGe Linux Operations
MaGe Linux Operations
Aug 24, 2020 · Fundamentals

Why Coroutines Outperform Threads: A Deep Dive into Python’s Generator Magic

Coroutines, also known as micro‑threads, allow a single thread to pause and resume functions, offering higher efficiency than traditional multithreading by eliminating context‑switch overhead and lock contention, with Python’s generator‑based implementation enabling lock‑free producer‑consumer patterns and seamless multi‑core utilization via processes.

Producer ConsumerPythonconcurrency
0 likes · 7 min read
Why Coroutines Outperform Threads: A Deep Dive into Python’s Generator Magic
Code Ape Tech Column
Code Ape Tech Column
Aug 22, 2020 · Fundamentals

How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS

This article breaks down the inner workings of Java’s ReentrantLock, explaining spin locks, the role of AbstractQueuedSynchronizer, fair vs. non‑fair locking, and step‑by‑step thread execution with code examples and diagrams to illustrate the complete lock acquisition and release process.

AQSLockReentrantLock
0 likes · 17 min read
How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS
Code Ape Tech Column
Code Ape Tech Column
Aug 21, 2020 · Fundamentals

Mastering Java Threads: From Basics to Priority and State Management

This article explains the fundamentals of Java threads, contrasting them with processes, demonstrates thread creation via extending Thread and implementing Runnable, discusses the benefits of multithreading, covers thread priority settings, and details the lifecycle states and transitions with practical code examples.

BackendThreadsconcurrency
0 likes · 9 min read
Mastering Java Threads: From Basics to Priority and State Management
Programmer DD
Programmer DD
Aug 20, 2020 · Fundamentals

Unlocking Java’s synchronized: When Does It Really Protect?

This article explores Java’s synchronized keyword in depth, covering its purpose, usage with object and class locks, seven multithreading scenarios, core principles like reentrancy and visibility, performance drawbacks, and best practices for choosing between synchronized and explicit Lock implementations.

concurrencylockingmultithreading
0 likes · 18 min read
Unlocking Java’s synchronized: When Does It Really Protect?
MaGe Linux Operations
MaGe Linux Operations
Aug 17, 2020 · Fundamentals

Boost Python Performance: Simple Parallelism with map and ThreadPool

This article explains why traditional Python threading tutorials are often over‑engineered, introduces the concise map‑based parallelism using multiprocessing and multiprocessing.dummy, and demonstrates how a few lines of code can dramatically speed up I/O‑bound and CPU‑bound tasks.

MAPParallelismThreadPool
0 likes · 11 min read
Boost Python Performance: Simple Parallelism with map and ThreadPool
Liangxu Linux
Liangxu Linux
Aug 13, 2020 · Fundamentals

When to Use Processes, Threads, or Coroutines in Python? A Practical Guide

This article explains the operating‑system concepts of processes, threads, and coroutines, compares their performance with Python code examples, discusses the impact of the GIL and DMA, and provides clear guidelines for choosing the right concurrency model based on CPU‑bound, I/O‑bound, or mixed workloads.

Threadconcurrencycoroutine
0 likes · 18 min read
When to Use Processes, Threads, or Coroutines in Python? A Practical Guide
Liangxu Linux
Liangxu Linux
Aug 12, 2020 · Fundamentals

Why Microkernels Can Beat Monolithic Kernels: A Deep Dive with C Simulations

The article examines the performance drawbacks of traditional monolithic kernels, especially IPC overhead, and argues that microkernel designs using arbitration can reduce lock contention, supported by C code simulations and benchmark graphs that compare execution time, CPU utilization, and scalability across thread and CPU counts.

IPCMonolithic KernelOperating System
0 likes · 19 min read
Why Microkernels Can Beat Monolithic Kernels: A Deep Dive with C Simulations
FunTester
FunTester
Aug 9, 2020 · Backend Development

Implementing Multithreaded Test Execution with Thread Pools and Distributed User Locks in Java

This article describes how to accelerate test case execution by introducing a global thread pool with CountDownLatch synchronization, presents the full Java implementations of the custom thread pool and test‑run thread classes, and explains a combined local and distributed user‑lock mechanism that uses ConcurrentHashMap caching and transactional locks to ensure safe credential retrieval.

DistributedLockTestingFrameworkThreadPool
0 likes · 9 min read
Implementing Multithreaded Test Execution with Thread Pools and Distributed User Locks in Java
Architect
Architect
Aug 8, 2020 · Fundamentals

Understanding Java Memory Model, Volatile, Atomicity, Visibility, and Ordering

This article explains the Java memory model, how variables are stored in main and working memory, and why concurrency issues like dirty reads, non‑atomic operations, and instruction reordering occur, while detailing the roles of volatile, synchronized, locks, and atomic classes in ensuring visibility, ordering, and atomicity.

Memory Modelatomicityconcurrency
0 likes · 21 min read
Understanding Java Memory Model, Volatile, Atomicity, Visibility, and Ordering
NetEase Game Operations Platform
NetEase Game Operations Platform
Aug 8, 2020 · Backend Development

Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy

This article analyzes the intermittent “Instance XXX is not bound to a Session” error that occurs after converting a Flask‑SQLAlchemy endpoint from serial to multithreaded/gevent concurrency, reproduces the issue with test code, explains the root cause in session handling, and provides a concrete fix by patching gevent before session initialization.

BackendFlaskPython
0 likes · 6 min read
Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy
Laravel Tech Community
Laravel Tech Community
Aug 7, 2020 · Databases

Understanding MySQL Locks, Isolation Levels, and Concurrency Control

This article explains MySQL's implicit and explicit locking mechanisms—including table, row, and intention locks—covers lock modes, MVCC, transaction isolation levels, optimistic and pessimistic locking, gap locks, and deadlock causes and solutions, providing practical SQL examples for each concept.

LocksMVCCconcurrency
0 likes · 12 min read
Understanding MySQL Locks, Isolation Levels, and Concurrency Control
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 7, 2020 · Backend Development

Understanding Callable, ExecutorService, and Future in Java

This article explains how Java's Callable interface, ExecutorService, and Future work together to execute asynchronous tasks, detailing their API relationships, internal implementations, and practical usage examples with code snippets illustrating task creation, submission, and result retrieval.

CallableExecutorServiceFuture
0 likes · 14 min read
Understanding Callable, ExecutorService, and Future in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 5, 2020 · Fundamentals

Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications

This article introduces the Singleton design pattern in Java, explains its purpose of ensuring a single class instance, presents multiple implementation approaches—including eager, lazy, double-checked locking, static inner class, and enum—with code examples, and discusses practical usage scenarios and recommendations.

Object-Orientedconcurrencydesign pattern
0 likes · 7 min read
Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications
FunTester
FunTester
Aug 4, 2020 · Backend Development

Mastering Java’s Phaser: A Flexible Alternative to CountDownLatch and CyclicBarrier

This article explains how Java’s Phaser class extends the capabilities of CountDownLatch and CyclicBarrier, offering dynamic phase management for multistage tasks, details its constructors and key methods, compares usage scenarios, and provides a complete code demo illustrating practical implementation.

PhaserSynchronizationconcurrency
0 likes · 9 min read
Mastering Java’s Phaser: A Flexible Alternative to CountDownLatch and CyclicBarrier
FunTester
FunTester
Aug 3, 2020 · Backend Development

Mastering Java’s CyclicBarrier: Synchronize Threads with Ease

This article explains Java’s CyclicBarrier synchronization barrier introduced in JDK 1.5, detailing its constructors, key methods such as await() and reset(), usage patterns for coordinating multiple threads in performance testing, and provides a complete demo with code examples and practical tips for handling timeouts and exceptions.

CyclicBarrierJDK1.5concurrency
0 likes · 7 min read
Mastering Java’s CyclicBarrier: Synchronize Threads with Ease
Top Architect
Top Architect
Aug 2, 2020 · Backend Development

Key Considerations for Implementing a Local Cache in Java

This article outlines the essential design considerations for building a local cache in Java, covering data structures, capacity limits, eviction policies, expiration handling, thread safety, blocking mechanisms, simple APIs, and optional persistence, with illustrative code examples.

concurrencyevictionjava
0 likes · 13 min read
Key Considerations for Implementing a Local Cache in Java
FunTester
FunTester
Aug 2, 2020 · Backend Development

Understanding Java CountDownLatch: Introduction, Core Methods, and Practical Usage

This article explains Java’s CountDownLatch class, covering its package location, constructor, essential await and countDown methods, and demonstrates practical integration within a multithreaded performance testing framework, including sample code for task execution, thread management, and cleanup.

CountDownLatchconcurrencyjava
0 likes · 5 min read
Understanding Java CountDownLatch: Introduction, Core Methods, and Practical Usage
FunTester
FunTester
Jul 30, 2020 · Backend Development

Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It

A Java Spring service method misused map.contains and REQUIRES_NEW transaction propagation, leading to unreleased DB connections and a CannotCreateTransactionException, and the article walks through the bug, its root causes, and concrete fixes including correct key checks and timeout settings.

concurrencydatabasedebugging
0 likes · 7 min read
Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It
58 Tech
58 Tech
Jul 27, 2020 · Databases

Implementing Distributed Locks with Databases, Redis, and Zookeeper

This article explains how to build distributed locks using three different technologies—database tables, Redis, and Zookeeper—detailing their implementation steps, code examples, advantages, drawbacks, and practical considerations for choosing the right solution in real‑world scenarios.

ZooKeeperconcurrencydatabase
0 likes · 17 min read
Implementing Distributed Locks with Databases, Redis, and Zookeeper
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 27, 2020 · Backend Development

Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring

This article provides a comprehensive explanation of Spring's @EnableAsync and @Async annotations, covering their purpose, usage steps, handling of return values, custom thread‑pool configuration, exception handling, thread‑pool isolation, and the underlying AOP mechanism, supplemented with complete code examples.

AsyncThreadPoolconcurrency
0 likes · 18 min read
Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 24, 2020 · Fundamentals

Understanding Java's AbstractQueuedSynchronizer (AQS): Concepts, Internal Implementation, and Resource Acquisition/Release

This article explains the core concepts of Java's AbstractQueuedSynchronizer (AQS), its internal FIFO double‑linked list structure, key code snippets, how threads acquire and release resources in exclusive and shared modes, and provides practical insights for mastering Java concurrency.

AQSAbstractQueuedSynchronizerLock
0 likes · 12 min read
Understanding Java's AbstractQueuedSynchronizer (AQS): Concepts, Internal Implementation, and Resource Acquisition/Release
Programmer DD
Programmer DD
Jul 18, 2020 · Fundamentals

Master Java Concurrency: Callable, Future & FutureTask Explained

This article explores Java's thread creation methods, contrasts Runnable and Callable, delves into the ExecutorService API, and provides an in‑depth analysis of Future, FutureTask, and their internal state management, complete with practical code examples and performance‑optimizing techniques for concurrent programming.

CallableFutureThreadPool
0 likes · 23 min read
Master Java Concurrency: Callable, Future & FutureTask Explained
Beike Product & Technology
Beike Product & Technology
Jul 16, 2020 · Backend Development

Migrating PHP Services to Golang: Performance Optimization and Concurrency Practices

This article details a real‑world migration from PHP to Golang for a high‑traffic mini‑program backend, explaining the performance bottlenecks of PHP, the advantages of Go such as goroutine concurrency and low‑memory footprint, the step‑by‑step implementation, caching strategy, monitoring, tooling, and the measurable latency and stability improvements achieved.

GolangMicroservicesbackend-migration
0 likes · 14 min read
Migrating PHP Services to Golang: Performance Optimization and Concurrency Practices
Selected Java Interview Questions
Selected Java Interview Questions
Jul 14, 2020 · Backend Development

Deep Dive into Java HashMap: Implementation Details, Internals, and Interview Questions

This article explains the internal design of Java's HashMap—including its default capacity, load factor, underlying array‑list‑tree structure, hash calculation, resizing algorithm, treeification, and common interview questions—while providing complete source code snippets and practical usage tips for developers.

CollectionsData StructuresHashMap
0 likes · 22 min read
Deep Dive into Java HashMap: Implementation Details, Internals, and Interview Questions
Qunar Tech Salon
Qunar Tech Salon
Jul 14, 2020 · Backend Development

Distributed Lock Mechanisms and Their Redis Implementations

This article explains the concept of distributed locks, compares various implementation approaches such as Memcached, Zookeeper, Chubby, and Redis, and details single‑node and multi‑node Redis lock designs—including SETNX, SET with NX/EX options, Redisson, and the Redlock algorithm—while highlighting their advantages, pitfalls, and best‑practice recommendations.

Redlockconcurrencydatabase
0 likes · 14 min read
Distributed Lock Mechanisms and Their Redis Implementations
Programmer DD
Programmer DD
Jul 12, 2020 · Backend Development

How to Calculate the Optimal Thread Pool Size for Java Applications

This article compares two popular formulas for estimating Java thread pool size, analyzes their equivalence, and provides practical guidelines for configuring thread counts in I/O‑bound and CPU‑bound workloads, including code examples and performance considerations.

concurrencyjavaperformance
0 likes · 5 min read
How to Calculate the Optimal Thread Pool Size for Java Applications
Sohu Tech Products
Sohu Tech Products
Jul 8, 2020 · Fundamentals

Understanding Deadlocks: Causes, Conditions, Prevention, Detection, and Recovery

Deadlocks occur when multiple processes hold exclusive resources while waiting for each other, leading to indefinite blocking; this article explains deadlock concepts, resource types, the four necessary conditions, various detection and recovery methods, prevention strategies such as the banker’s algorithm, and related issues like livelocks and starvation.

Operating SystemsSynchronizationconcurrency
0 likes · 28 min read
Understanding Deadlocks: Causes, Conditions, Prevention, Detection, and Recovery
Big Data Technology & Architecture
Big Data Technology & Architecture
Jul 8, 2020 · Fundamentals

Understanding Java Locks: Optimistic vs Pessimistic, Spin Locks, and ReentrantLock

This article explains the various types of locks provided by Java, compares optimistic and pessimistic locking, introduces spin locks and adaptive spin locks, details lock states such as biased, lightweight, and heavyweight, and examines fair versus non‑fair, reentrant versus non‑reentrant, and exclusive versus shared locks with source code references.

CASLocksReentrantLock
0 likes · 25 min read
Understanding Java Locks: Optimistic vs Pessimistic, Spin Locks, and ReentrantLock
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 6, 2020 · Backend Development

Analyzing JDK 1.8 FutureTask Source Code

This article provides a detailed analysis of JDK 1.8’s FutureTask implementation, explaining its purpose, usage examples, internal structure, state transitions, key methods such as run, get, cancel, and the concurrency mechanisms like volatile fields, CAS operations, and thread‑waiting queues.

CallableFutureFutureTask
0 likes · 32 min read
Analyzing JDK 1.8 FutureTask Source Code
Selected Java Interview Questions
Selected Java Interview Questions
Jul 5, 2020 · Fundamentals

Java Concurrency Interview Questions and Answers: Wait/Notify, Locks, Volatile, AQS, Thread Pools, and More

This article provides a comprehensive overview of Java concurrency concepts for interview preparation, covering wait/notify mechanisms, atomicity, visibility, ordering, synchronized implementation, volatile semantics, Java Memory Model, AQS, lock characteristics, ReentrantLock, ReadWriteLock, thread pool configurations, and producer‑consumer patterns with code examples.

LocksThreadconcurrency
0 likes · 24 min read
Java Concurrency Interview Questions and Answers: Wait/Notify, Locks, Volatile, AQS, Thread Pools, and More
JavaEdge
JavaEdge
Jul 5, 2020 · Backend Development

Why Java Concurrency Is Tricky: 4 Pitfalls Every Developer Must Avoid

The article explains why Java concurrency is fraught with hidden traps, outlines four key misconceptions, and offers practical guidance on safely using threads, understanding memory models, and recognizing the limits of testing and libraries.

concurrencyjavamultithreading
0 likes · 11 min read
Why Java Concurrency Is Tricky: 4 Pitfalls Every Developer Must Avoid