Tagged articles

concurrency

2234 articles · Page 17 of 23
ITPUB
ITPUB
Mar 2, 2021 · Fundamentals

Master OS Interview Questions: From Basics to Advanced Concepts

This comprehensive guide covers over forty operating system interview questions, explaining core concepts such as OS fundamentals, process and thread management, memory handling, file systems, I/O mechanisms, scheduling algorithms, and deadlock prevention, providing detailed answers and diagrams to help candidates excel in technical interviews.

Interview QuestionsMemory ManagementProcess Management
0 likes · 65 min read
Master OS Interview Questions: From Basics to Advanced Concepts
Laravel Tech Community
Laravel Tech Community
Feb 27, 2021 · Fundamentals

Understanding Processes, Threads, Concurrency, and Process Pools

This article explains the concepts of processes and threads, their differences, interaction methods, the relationship between them, the three execution states of a task, the distinctions among parallel, concurrent, and serial execution, and the purpose and operation of process pools in operating systems.

Process Poolconcurrencyprocess
0 likes · 10 min read
Understanding Processes, Threads, Concurrency, and Process Pools
360 Smart Cloud
360 Smart Cloud
Feb 25, 2021 · Backend Development

Understanding Distributed Locks: Concepts, System Classification, and Implementations with Redis and etcd/Zookeeper

This article explains the fundamentals of distributed locks, compares lock implementations based on asynchronous replication and Paxos protocols, and provides practical Redis and etcd/Zookeeper examples—including exclusive and shared lock mechanisms, code snippets, and usage considerations for reliability and safety.

Zookeeperbackendconcurrency
0 likes · 9 min read
Understanding Distributed Locks: Concepts, System Classification, and Implementations with Redis and etcd/Zookeeper
Tencent Cloud Developer
Tencent Cloud Developer
Feb 24, 2021 · Backend Development

Common Concurrency Bugs in Go and Their Fixes

Analyzing several major Go projects, the article catalogs frequent concurrency pitfalls—such as unbuffered channels, WaitGroup deadlocks, context leaks, loop‑variable races, double channel closes, timer errors, and RWMutex misuse—and offers concise, idiomatic fixes to prevent blocking, leaks, panics, and deadlocks.

ChannelsGoRaceConditions
0 likes · 10 min read
Common Concurrency Bugs in Go and Their Fixes
Top Architect
Top Architect
Feb 23, 2021 · Backend Development

Understanding Java 8 Stream API: Architecture, Parallelism, and Best Practices

This article explains the design and implementation of Java 8 Stream API, covering its composition, pipelining, internal iteration, parallel execution via ForkJoinPool, performance considerations, ordering semantics, and practical guidelines for using parallel streams effectively.

ForkJoinPoolJavaParallel Streams
0 likes · 21 min read
Understanding Java 8 Stream API: Architecture, Parallelism, and Best Practices
Top Architect
Top Architect
Feb 22, 2021 · Backend Development

Lazy Initialization and Lazy Loading in Java: Using Supplier, Streams, and Virtual Proxy Patterns

This article explains the concepts of eager versus lazy evaluation in Java, presents common scenarios for lazy initialization, demonstrates how to implement lazy loading with Supplier, virtual proxy, and delegate patterns, and shows practical Stream examples including infinite prime number generation.

Design PatternsJavaLazy Initialization
0 likes · 11 min read
Lazy Initialization and Lazy Loading in Java: Using Supplier, Streams, and Virtual Proxy Patterns
FunTester
FunTester
Feb 20, 2021 · Backend Development

How I Stress‑Tested a Socket.IO Service with Fixed QPS and Uncovered Hidden Bugs

After mastering the Socket protocol and a fixed‑QPS load‑testing model, I built a comprehensive Socket.IO performance test that simulates a teacher‑student scenario, measures message latency, identifies calculation errors and logging overhead, and reveals several bugs and optimization opportunities in the asynchronous handling and compensation threads.

JavaPerformanceSocket.IO
0 likes · 10 min read
How I Stress‑Tested a Socket.IO Service with Fixed QPS and Uncovered Hidden Bugs
Programmer DD
Programmer DD
Feb 19, 2021 · Backend Development

Mastering Lazy Initialization and Stream Laziness in Java 8

This article explains the difference between eager and lazy evaluation, shows when and how to use lazy initialization in Java, demonstrates Supplier‑based lazy loading, virtual proxy patterns, and stream laziness with infinite streams and prime number generation, all with concrete code examples.

Functional ProgrammingJavaLazy Initialization
0 likes · 12 min read
Mastering Lazy Initialization and Stream Laziness in Java 8
Top Architect
Top Architect
Feb 10, 2021 · Backend Development

Understanding Thread Safety Issues in Java ArrayList and How to Fix Them

This article explains why Java's ArrayList is not thread‑safe, illustrates the two main concurrency problems—array index out‑of‑bounds and element overwriting—through source‑code analysis and multithreaded examples, and presents several practical solutions such as synchronized wrappers, explicit locking, CopyOnWriteArrayList and ThreadLocal.

CollectionsCopyOnWriteArrayListJava
0 likes · 11 min read
Understanding Thread Safety Issues in Java ArrayList and How to Fix Them
FunTester
FunTester
Feb 7, 2021 · Backend Development

Using ThreadLocal for Collect/Uncollect Performance Testing in Java

This article demonstrates how to apply Java's ThreadLocal together with an AtomicInteger to generate unique minisource_id values for a collect‑and‑uncollect workflow, and shows the complete code modifications and performance‑test script used to measure request latency.

JavaThreadLocalbackend
0 likes · 6 min read
Using ThreadLocal for Collect/Uncollect Performance Testing in Java
FunTester
FunTester
Feb 6, 2021 · Fundamentals

Mastering Java ThreadLocal: Achieve Thread‑Safe Objects Without synchronized

This article explains how Java's ThreadLocal class provides a thread‑local storage mechanism that creates independent object instances for each thread, improving scalability and performance compared to synchronized blocks, and demonstrates its usage with practical code examples and best‑practice guidelines.

JavaThread SafetyThreadLocal
0 likes · 8 min read
Mastering Java ThreadLocal: Achieve Thread‑Safe Objects Without synchronized
Senior Brother's Insights
Senior Brother's Insights
Feb 1, 2021 · Backend Development

Mastering Java Thread Pools: When to Use Each Executor Type

This article explains the concept of thread pools, compares seven creation methods in Java, details their parameters, execution flow, and rejection policies, and provides practical code examples to help developers choose the most appropriate pool for reliable and efficient multithreaded programming.

JavaThreadPoolThreadPoolExecutor
0 likes · 17 min read
Mastering Java Thread Pools: When to Use Each Executor Type
macrozheng
macrozheng
Jan 25, 2021 · Backend Development

Designing a Flexible Java ThreadPoolExecutor: From Basics to Advanced Features

This article walks through building a custom thread pool executor in Java, starting with a simple thread creation example, evolving through multiple design iterations, and culminating in a full-featured implementation that supports core and maximum pool sizes, task queues, thread factories, and rejection policies.

ExecutorJavaThreadPoolExecutor
0 likes · 10 min read
Designing a Flexible Java ThreadPoolExecutor: From Basics to Advanced Features
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 24, 2021 · Backend Development

Understanding and Using AtomicReference for Thread‑Safe Updates in Java

This article explains the limitations of volatile for compound updates, demonstrates non‑thread‑safe bank‑account examples, introduces synchronized locking, and then shows how AtomicReference with CAS operations provides a lock‑free, thread‑safe solution, including a deep dive into its internal implementation and related memory‑barrier concepts.

AtomicReferenceCASJava
0 likes · 14 min read
Understanding and Using AtomicReference for Thread‑Safe Updates in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 13, 2021 · Backend Development

Understanding Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities

This article provides an in-depth explanation of Java's AbstractQueuedSynchronizer (AQS) framework, covering its role in JUC concurrency utilities such as locks, semaphores, CountDownLatch, ReentrantReadWriteLock, and Condition, including template methods, state management, node structures, queue algorithms, and practical code examples.

AQSConditionJUC
0 likes · 25 min read
Understanding Java's AbstractQueuedSynchronizer (AQS) and Concurrency Utilities
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 8, 2021 · Backend Development

Deep Dive into Java HashMap, ConcurrentHashMap, JMM, and Concurrency Fundamentals

This article provides a comprehensive overview of Java's HashMap and ConcurrentHashMap implementations, explains core concurrency concepts such as thread states, the differences between concurrency and parallelism, memory models, volatile semantics, singleton patterns, thread pools, ThreadLocal, CAS, and the AQS framework.

HashMapJavaThreadPool
0 likes · 31 min read
Deep Dive into Java HashMap, ConcurrentHashMap, JMM, and Concurrency Fundamentals
Top Architect
Top Architect
Jan 7, 2021 · Fundamentals

Android HashMap Source Code Analysis (Based on Android SDK 28)

This article provides a detailed analysis of the Android HashMap implementation in SDK 28, covering its fields, internal Node class, constructors, resizing logic, hash function, collision handling, and related Map implementations, with complete source code excerpts and performance considerations.

AndroidCollisionResolutionDataStructure
0 likes · 34 min read
Android HashMap Source Code Analysis (Based on Android SDK 28)
vivo Internet Technology
vivo Internet Technology
Jan 6, 2021 · Fundamentals

Deep Dive into Java Volatile Keyword: CPU Cache, MESI Protocol, and JMM

The article thoroughly explains how CPU caches and the MESI coherence protocol interact with Java’s Memory Model, detailing the volatile keyword’s role in ensuring visibility and preventing instruction reordering, and illustrates these concepts with examples such as visibility problems and double‑checked locking.

CPU cacheJavaMESI Protocol
0 likes · 22 min read
Deep Dive into Java Volatile Keyword: CPU Cache, MESI Protocol, and JMM
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 4, 2021 · Backend Development

Understanding ThreadPoolExecutor keepAliveTime=0 in Java

This article clarifies that setting keepAliveTime to 0 in a Java ThreadPoolExecutor causes excess idle threads beyond corePoolSize to terminate immediately, correcting the common misconception that 0 means threads live forever, and demonstrates the behavior with a concise code example.

JavaThreadPoolThreadPoolExecutor
0 likes · 4 min read
Understanding ThreadPoolExecutor keepAliveTime=0 in Java
Architecture Digest
Architecture Digest
Jan 3, 2021 · Operations

Understanding How Many Concurrent TCP Connections a Server Can Actually Support

This article explains the true limits of concurrent TCP connections on a server, debunks common misconceptions about port numbers, details the TCP four‑tuple theory, outlines Linux file‑descriptor restrictions, shows how to tune kernel buffers with sysctl, and shares a real‑world test achieving one million active connections.

TCPconcurrencyfile descriptors
0 likes · 6 min read
Understanding How Many Concurrent TCP Connections a Server Can Actually Support
ITPUB
ITPUB
Dec 31, 2020 · Operations

How Many TCP Connections Can One Server Really Handle? A Deep Dive into Linux Limits

This article demystifies common misconceptions about server concurrency, explains the theoretical maximum TCP connections based on the four‑tuple, details Linux file‑descriptor and buffer limits, and walks through a practical experiment that achieves over one million simultaneous connections on a single machine.

PerformanceTCPconcurrency
0 likes · 7 min read
How Many TCP Connections Can One Server Really Handle? A Deep Dive into Linux Limits
FunTester
FunTester
Dec 31, 2020 · Operations

Speed Up Load Test Preparation with Java CyclicBarrier

This article explains how to use Java's CyclicBarrier and related concurrency utilities to parallelize user login preparation for load testing, reducing setup time and synchronizing multi‑stage performance tests with concrete code examples and sample console output.

CyclicBarrierJavaconcurrency
0 likes · 8 min read
Speed Up Load Test Preparation with Java CyclicBarrier
Liangxu Linux
Liangxu Linux
Dec 30, 2020 · Backend Development

Master High-Performance Backend Development: 10 Essential Techniques

This guide walks developers through a step‑by‑step progression of performance‑boosting techniques—including zero‑copy I/O, epoll, thread pools, lock‑free programming, IPC, RPC, database indexing, caching, Bloom filters, full‑text search, and load balancing—to help build faster, more scalable backend services.

Backend PerformanceI/O optimizationRPC
0 likes · 22 min read
Master High-Performance Backend Development: 10 Essential Techniques
Liangxu Linux
Liangxu Linux
Dec 30, 2020 · Backend Development

How Servers Serve Millions: Processes, Threads, and Event Loops Explained

This article explains how servers handle massive concurrent requests by evolving from simple multi‑process models to lightweight threads, then to event‑driven architectures with I/O multiplexing, highlighting the trade‑offs of blocking versus non‑blocking I/O and the role of coroutines.

IO Multiplexingconcurrencyevent loop
0 likes · 12 min read
How Servers Serve Millions: Processes, Threads, and Event Loops Explained
Java Interview Crash Guide
Java Interview Crash Guide
Dec 29, 2020 · Backend Development

How Distributed Locks Prevent Chaos in Massive Red‑Packet Systems

This article explains why traditional locks fail under massive concurrent traffic, how distributed locks coordinate multiple servers to ensure correct total payouts, and compares Redis and Zookeeper implementations, highlighting their mechanisms, pitfalls, and practical considerations for large‑scale systems.

Zookeeperconcurrencydistributed lock
0 likes · 13 min read
How Distributed Locks Prevent Chaos in Massive Red‑Packet Systems
High Availability Architecture
High Availability Architecture
Dec 27, 2020 · Fundamentals

Understanding Coroutines: From Ordinary Functions to User‑Level Threads

This article explains the concept of coroutines, compares them with ordinary functions, shows Python code examples of yielding and resuming execution, illustrates their historical background, and describes how they are implemented using heap‑allocated stack frames to achieve lightweight, user‑level concurrency.

Programming FundamentalsPythonconcurrency
0 likes · 13 min read
Understanding Coroutines: From Ordinary Functions to User‑Level Threads
360 Quality & Efficiency
360 Quality & Efficiency
Dec 25, 2020 · Backend Development

Evolution of Redis Distributed Locks and Redisson Implementation Analysis

This article explains how distributed lock requirements arise when scaling from monolithic to multi‑server architectures, reviews the evolution of Redis‑based locking mechanisms from simple SETNX to Lua scripts and Redisson's advanced features, and provides detailed source‑code analysis of Redisson's lock, unlock, and lock acquisition implementations.

LockRedisRedisson
0 likes · 12 min read
Evolution of Redis Distributed Locks and Redisson Implementation Analysis
macrozheng
macrozheng
Dec 24, 2020 · Backend Development

Mastering Java Thread Pools: When and How to Choose the Right One

This article explains the concept of thread pools, compares seven creation methods—including FixedThreadPool, CachedThreadPool, and ThreadPoolExecutor—covers their parameters, execution flow, and rejection policies, and offers guidance on selecting the most appropriate pool for Java applications.

JavaThreadPoolconcurrency
0 likes · 20 min read
Mastering Java Thread Pools: When and How to Choose the Right One
Refining Core Development Skills
Refining Core Development Skills
Dec 23, 2020 · Fundamentals

Understanding Linux TCP Socket Internals and Port Range Configuration

This article explains how to adjust Linux kernel port ranges and file descriptor limits, explores the internal structures of TCP sockets, and walks through key kernel functions such as tcp_v4_rcv and __inet_lookup that locate sockets based on IP and port tuples, providing practical guidance for increasing TCP concurrency.

Linux kernelNetworkingPort Range
0 likes · 8 min read
Understanding Linux TCP Socket Internals and Port Range Configuration
Code Ape Tech Column
Code Ape Tech Column
Dec 17, 2020 · Backend Development

108 Essential Java Multithreading Interview Questions and Answers

This comprehensive guide compiles 108 common Java multithreading interview questions, covering the purpose of concurrency, thread creation methods, lifecycle nuances, synchronization utilities, memory visibility, thread safety levels, debugging techniques, executor frameworks, concurrent collections, atomic operations, lock implementations, and best‑practice recommendations.

ExecutorJavaVolatile
0 likes · 59 min read
108 Essential Java Multithreading Interview Questions and Answers
High Availability Architecture
High Availability Architecture
Dec 16, 2020 · Backend Development

Implementing Task Scheduling Dependencies and Workflow with Go and DAG

This article explains the concepts of task scheduling dependencies and workflow, introduces graph theory basics such as vertices, edges, and DAGs, and provides a complete Go implementation—including graph structures, BFS traversal, topological sorting, and concurrent execution—to efficiently manage dependent tasks in distributed systems.

DAGGoGraph
0 likes · 10 min read
Implementing Task Scheduling Dependencies and Workflow with Go and DAG
Programmer DD
Programmer DD
Dec 11, 2020 · Backend Development

Why Does Executors.newSingleThreadExecutor Shut Down Unexpectedly? Uncovering GC and Finalize Mysteries

This article investigates the intermittent RejectedExecutionException caused by Executors.newSingleThreadExecutor, explains how Java's garbage collector and finalize method can prematurely shut down thread pools, demonstrates the behavior with reproducible code, and shows how newer JDK versions have fixed the issue.

GarbageCollectionJavaThreadPool
0 likes · 11 min read
Why Does Executors.newSingleThreadExecutor Shut Down Unexpectedly? Uncovering GC and Finalize Mysteries
MaGe Linux Operations
MaGe Linux Operations
Dec 10, 2020 · Backend Development

Is Async Python Really Faster? Uncover the Sync vs Async Truth

This article explains the difference between synchronous and asynchronous Python, how each model handles concurrency, the two main async implementations (coroutine‑based and greenlet‑based), and when async can actually outperform sync in high‑load, I/O‑bound scenarios.

asyncbackendconcurrency
0 likes · 12 min read
Is Async Python Really Faster? Uncover the Sync vs Async Truth
Architecture Digest
Architecture Digest
Dec 9, 2020 · Backend Development

Implementing Distributed Locks with Redis: Concepts, Algorithms, and Code Examples

This article explains how to implement distributed locks using Redis, covering the essential requirements of mutual exclusion, deadlock avoidance, and fault tolerance, detailing single‑instance and multi‑instance algorithms, code examples with SETNX and Lua scripts, and discussing challenges such as latency, crashes, and persistence.

backend developmentconcurrencyfault tolerance
0 likes · 10 min read
Implementing Distributed Locks with Redis: Concepts, Algorithms, and Code Examples
ITPUB
ITPUB
Dec 8, 2020 · Operations

How Many TCP Connections Can One Server Really Handle? A Deep Dive into Linux Limits

This article demystifies the true maximum number of concurrent TCP connections a single Linux server can sustain, explaining the theoretical limits of the TCP four‑tuple, the practical constraints imposed by file descriptor and memory settings, and walks through a real‑world experiment achieving one million connections.

NetworkingServerTCP
0 likes · 6 min read
How Many TCP Connections Can One Server Really Handle? A Deep Dive into Linux Limits
JD Retail Technology
JD Retail Technology
Dec 1, 2020 · Fundamentals

In‑Depth Source Code Analysis of Kotlin Coroutines: Launch, Suspension, and Resumption

This article provides a comprehensive source‑code walkthrough of Kotlin coroutines, explaining how launch creates a coroutine, how the compiler transforms suspend functions into state‑machine classes, and detailing the mechanisms of suspension and resumption through Continuation, Dispatchers, and the coroutine scheduler.

CoroutinesDispatcherKotlin
0 likes · 46 min read
In‑Depth Source Code Analysis of Kotlin Coroutines: Launch, Suspension, and Resumption
Programmer DD
Programmer DD
Nov 30, 2020 · Backend Development

How Many Threads Are Optimal? Mastering Thread Pool Sizing for Maximum Performance

This article explains why multithreading improves program performance, distinguishes latency reduction from throughput increase, and provides practical formulas to determine the ideal number of threads for both I/O‑bound and CPU‑bound workloads, helping you fully utilize hardware resources.

I/O BoundPerformance Optimizationconcurrency
0 likes · 4 min read
How Many Threads Are Optimal? Mastering Thread Pool Sizing for Maximum Performance
Selected Java Interview Questions
Selected Java Interview Questions
Nov 24, 2020 · Backend Development

Understanding Java BlockingQueue: Concepts, Implementations, and a Custom Example

This article explains the fundamentals of queues and blocking queues, describes how Java's java.util.concurrent.BlockingQueue works, outlines its main methods and common implementations, and provides a complete custom BlockingQueue source code example for multithreaded producer‑consumer scenarios.

BlockingQueueJavabackend development
0 likes · 10 min read
Understanding Java BlockingQueue: Concepts, Implementations, and a Custom Example
Nullbody Notes
Nullbody Notes
Nov 19, 2020 · Fundamentals

Understanding the Singleton Pattern in Go: Eager vs Lazy Implementations

The article explains Go's singleton pattern, detailing eager (init) and lazy implementations using sync.Mutex and sync.Once, provides full code examples, demonstrates that each accessor returns the same instance, and discusses trade‑offs between memory usage and performance.

Design PatternGoconcurrency
0 likes · 5 min read
Understanding the Singleton Pattern in Go: Eager vs Lazy Implementations
Architecture Digest
Architecture Digest
Nov 18, 2020 · Backend Development

Deep Dive into Java ConcurrentHashMap: Implementation, Concurrency Mechanisms, and Core Methods

This article provides a comprehensive analysis of Java's ConcurrentHashMap, covering its historical evolution, key internal fields, the thread‑safe put and remove operations, the complex resizing and transfer mechanisms, and auxiliary methods such as size, get, and clear, all illustrated with original source code.

ConcurrentHashMapData StructuresJDK
0 likes · 24 min read
Deep Dive into Java ConcurrentHashMap: Implementation, Concurrency Mechanisms, and Core Methods
Laravel Tech Community
Laravel Tech Community
Nov 15, 2020 · Databases

MySQL Lock Types and Deadlock Causes with Practical Examples

This article explains MySQL's three lock levels—table, row, and page—describes next‑key, gap, and record locks, analyzes why deadlocks occur, and provides multiple real‑world examples and prevention strategies, including code snippets for reproducible scenarios.

DatabaseDeadlockInnoDB
0 likes · 12 min read
MySQL Lock Types and Deadlock Causes with Practical Examples
MaGe Linux Operations
MaGe Linux Operations
Nov 15, 2020 · Backend Development

Why Distributed Locks Matter: Redis vs Zookeeper Explained

This article examines the stock‑oversell problem in high‑concurrency e‑commerce systems, explains why native JVM locks fail in multi‑machine deployments, and compares practical distributed‑lock solutions using Redis (including RedLock and Redisson) and Zookeeper (with Curator), highlighting their advantages, drawbacks, and selection guidelines.

Redissonbackendconcurrency
0 likes · 18 min read
Why Distributed Locks Matter: Redis vs Zookeeper Explained
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.

RedissonZookeeperconcurrency
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.

JavaPerformancebug fix
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.

JavaLockSemaphore
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.

JavaRxJavaSpring Reactor
0 likes · 13 min read
Why Reactive Programming Is the Future of High-Concurrency Java Development
WeDoctor Frontend Technology
WeDoctor Frontend Technology
Oct 20, 2020 · Mobile Development

Why YYCache Excels: Deep Dive into iOS Cache Design & Performance

This article examines the YYCache iOS library, covering its multi‑level architecture, LRU implementation, thread‑safe APIs, eviction policies, lock choices, disk‑storage strategies, Swift integration, performance benchmarks, and practical takeaways for building high‑performance mobile caches.

CacheLRUPerformance
0 likes · 24 min read
Why YYCache Excels: Deep Dive into iOS Cache Design & Performance
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.

ExecutorsJavaShutdown
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.

JVMJavaObject header
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.

JavaPerformanceconcurrency
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.

ConcurrentHashMapHashMapJava
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.

AsynchronousJUCJava
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.

JavaUnique 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.

CompletableFutureDeadlockDubbo
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.

AtomicIntegerCASJava
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.

Javaconcurrencymultithreading
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.

JavaThreadPoolconcurrency
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.

CASJavaThreadPool
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.

JVMJavaStringBuilder
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().

APIJavaconcurrency
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.

concurrencyconsistencyfault 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.

DBMSLoggingconcurrency
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 StructuresJava
0 likes · 26 min read
Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations