Tagged articles
2072 articles
Page 18 of 21
AI Code to Success
AI Code to Success
Jan 11, 2020 · Mobile Development

Why Does Creating a Handler in a Background Thread Throw an Exception?

This article explains Android's Handler and Looper mechanism, shows why creating a Handler in a non‑Looper thread triggers a RuntimeException, and walks through the relevant source code—including Handler constructors, Looper.myLooper(), ThreadLocal operations, and the required Looper.prepare() call.

ANRAndroidHandler
0 likes · 10 min read
Why Does Creating a Handler in a Background Thread Throw an Exception?
JavaEdge
JavaEdge
Jan 6, 2020 · Fundamentals

Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency

This article explains the Compare‑And‑Swap (CAS) primitive, its three operands, how Java's Unsafe class implements CAS methods, the internal workings of AtomicInteger, common pitfalls like spinning, single‑variable limits and the ABA problem, and the enhancements introduced in Java 8.

AtomicIntegerCASJDK8
0 likes · 9 min read
Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency
JavaEdge
JavaEdge
Jan 4, 2020 · Backend Development

Mastering Java’s Unsafe park/unpark and AQS: Build Custom Locks with LockSupport

This article explains how Java’s Unsafe class provides low‑level park and unpark methods, how the LockSupport utility wraps them for easier use, and demonstrates building a simple exclusive lock with AbstractQueuedSynchronizer, covering state handling, blocking mechanisms, and thread‑queue management.

AQSCustomLockLockSupport
0 likes · 7 min read
Mastering Java’s Unsafe park/unpark and AQS: Build Custom Locks with LockSupport
Test Development Learning Exchange
Test Development Learning Exchange
Dec 31, 2019 · Fundamentals

Multithreading Concepts: Locks, Deadlock, Recursive Locks, and Daemon Threads

This article explains multithreading fundamentals, covering thread concepts, lock mechanisms for database access, deadlock causes and solutions, recursive locks (RLock), data race issues, and daemon thread behavior. It also discusses connection pooling, timeout strategies to avoid deadlock, and practical code examples in Python.

Connection PoolingDaemon ThreadLocks
0 likes · 6 min read
Multithreading Concepts: Locks, Deadlock, Recursive Locks, and Daemon Threads
Big Data Technology & Architecture
Big Data Technology & Architecture
Dec 26, 2019 · Fundamentals

Java Thread Interview Questions and Answers with Code Examples

This article provides a comprehensive guide to common Java multithreading interview questions, covering thread ordering with join, lock vs synchronized, read‑write locks, wait vs sleep, blocking queues, producer‑consumer patterns, deadlock detection, thread dumps, thread states, and immutable objects, all illustrated with runnable code samples.

BlockingQueueLockThread
0 likes · 33 min read
Java Thread Interview Questions and Answers with Code Examples
FunTester
FunTester
Dec 26, 2019 · Backend Development

Deep‑Copying HttpRequestBase in Java: A Custom FunRequest Wrapper

This article explains why a separate HttpRequestBase object is needed for each concurrent request in a performance testing framework, and provides a complete Java implementation of a FunRequest class that offers deep‑copy, cloning, and fluent configuration of GET/POST HTTP requests.

BackendHttpClientcloning
0 likes · 8 min read
Deep‑Copying HttpRequestBase in Java: A Custom FunRequest Wrapper
Alibaba Cloud Native
Alibaba Cloud Native
Dec 25, 2019 · Backend Development

Master Go Panic/Recover, Thread Limits, and Error Handling – A Practical Guide

This article explores Go's panic/recover mechanism, identifies which runtime errors can be recovered, explains unrecoverable scenarios like thread exhaustion and map race, demonstrates best‑practice error handling with Go 1.13 features and popular error libraries, and offers concrete logging strategies for robust server development.

Error HandlingGOMAXPROCSGo
0 likes · 34 min read
Master Go Panic/Recover, Thread Limits, and Error Handling – A Practical Guide
Senior Brother's Insights
Senior Brother's Insights
Dec 16, 2019 · Backend Development

Mastering Java Thread Pools: Creation, Configuration, and Best Practices

This comprehensive guide explains Java thread pool fundamentals, creation methods, core parameters, rejection policies, execution flow, common work queues, and shutdown techniques, while providing interview questions, source‑code analysis, and practical code examples for robust concurrent programming.

ExecutorServiceJava MultithreadingThreadPoolExecutor
0 likes · 20 min read
Mastering Java Thread Pools: Creation, Configuration, and Best Practices
Selected Java Interview Questions
Selected Java Interview Questions
Dec 16, 2019 · Backend Development

How to Properly Stop a Java Thread: Methods, Examples, and Pitfalls

This article explains the various ways to terminate a running Java thread—including using exit flags, the deprecated stop() method, interrupt(), and exception handling—illustrates each approach with code samples, compares Thread.interrupted() and isInterrupted(), and discusses the dangers of forceful termination and lock release.

StopThreadconcurrency
0 likes · 12 min read
How to Properly Stop a Java Thread: Methods, Examples, and Pitfalls
Programmer DD
Programmer DD
Dec 15, 2019 · Backend Development

Java ThreadLocal Deep Dive: Structure, 0x61c88647 Hash Trick & Usage

This article explains the internal architecture of Java's ThreadLocal, including its ThreadLocalMap implementation, the purpose of the special hash code 0x61c88647, collision handling strategies, proper usage patterns in web applications, and precautions for avoiding memory leaks in thread pools.

HashingMemoryLeakThreadLocal
0 likes · 12 min read
Java ThreadLocal Deep Dive: Structure, 0x61c88647 Hash Trick & Usage
Java Captain
Java Captain
Dec 14, 2019 · Backend Development

Key Considerations and Implementation Strategies for a Local Cache in Java

This article outlines the essential design points for a local Java cache—including data structures, size limits, eviction policies, expiration handling, thread safety, blocking mechanisms, simple APIs, and persistence options—while providing concrete code examples and implementation guidance.

CachePersistenceconcurrency
0 likes · 12 min read
Key Considerations and Implementation Strategies for a Local Cache in Java
360 Tech Engineering
360 Tech Engineering
Dec 11, 2019 · Backend Development

Implementing a Simple Load Balancer in Go

This article walks through building a basic round‑robin load balancer in Go, covering the underlying principles, data structures, reverse‑proxy integration, atomic indexing, concurrency handling, health‑check mechanisms, and how to extend the implementation for production use.

GoLoad Balancerbackend-development
0 likes · 11 min read
Implementing a Simple Load Balancer in Go
Architecture Digest
Architecture Digest
Dec 7, 2019 · Fundamentals

Understanding the Java volatile Keyword and Its Role in Concurrency

This article explains the Java volatile keyword, covering its memory visibility and ordering guarantees, how it interacts with the Java Memory Model, common pitfalls such as lack of atomicity, and practical usage examples like flag signaling and double‑checked locking in concurrent programming.

JMMconcurrencyjava
0 likes · 17 min read
Understanding the Java volatile Keyword and Its Role in Concurrency
Meituan Technology Team
Meituan Technology Team
Dec 5, 2019 · Backend Development

Understanding AbstractQueuedSynchronizer (AQS) and ReentrantLock in Java

The article explains Java’s AbstractQueuedSynchronizer as the foundation of many concurrency utilities, details how ReentrantLock leverages AQS’s FIFO CLH queue, state field, and lock acquisition/release mechanisms, compares it with synchronized, and demonstrates building a custom lock with AQS.

AQSReentrantLockSynchronization
0 likes · 33 min read
Understanding AbstractQueuedSynchronizer (AQS) and ReentrantLock in Java
Programmer DD
Programmer DD
Dec 4, 2019 · Fundamentals

What a Fruit Store Can Teach You About Java Concurrency

This article uses a vivid fruit‑store analogy to explain Java multithreading concepts such as locks, synchronized blocks, wait/notify, thread states, time‑slicing, and volatile variables, helping readers grasp core concurrency mechanisms in an engaging narrative.

LocksSynchronizationconcurrency
0 likes · 18 min read
What a Fruit Store Can Teach You About Java Concurrency
Java Backend Technology
Java Backend Technology
Nov 28, 2019 · Backend Development

How to Prevent ThreadLocal Memory Leaks in Java: Causes and Solutions

This article explains why improper use of ThreadLocal can lead to memory leaks in Java, details the underlying weak‑reference mechanism, and provides practical steps—including explicit removal and Spring integration—to safely manage ThreadLocal data and avoid resource exhaustion.

ThreadLocalconcurrencyjava
0 likes · 7 min read
How to Prevent ThreadLocal Memory Leaks in Java: Causes and Solutions
Senior Brother's Insights
Senior Brother's Insights
Nov 26, 2019 · Backend Development

Why Executors Should Be Avoided for ThreadPool Creation in Java

This article explains the definition of thread pools, the pitfalls of using Executors factory methods, details the ThreadPoolExecutor constructor parameters, compares different Executors implementations, demonstrates OOM tests, and offers guidelines for configuring thread pool parameters and rejection policies.

ExecutorsOOMThread Pool Configuration
0 likes · 10 min read
Why Executors Should Be Avoided for ThreadPool Creation in Java
Java Backend Technology
Java Backend Technology
Nov 23, 2019 · Backend Development

Master Java Backend Interview Questions: Sets, HashMaps, Concurrency, and More

This article compiles essential Java backend interview topics, covering the differences between TreeSet and HashSet, HashMap collision handling and resizing, ConcurrentHashMap's lock strategy, thread pool creation, synchronization primitives like CountDownLatch and CyclicBarrier, database indexing, CAP theorem, idempotence, locking mechanisms, JVM GC roots, reflection, dynamic proxies, distributed locks, ThreadLocal optimization, and key considerations for designing a high‑traffic seckill system.

BackendData Structuresconcurrency
0 likes · 14 min read
Master Java Backend Interview Questions: Sets, HashMaps, Concurrency, and More
Programmer DD
Programmer DD
Nov 15, 2019 · Fundamentals

Why Concurrency Isn’t the Same as Parallelism: A Simple Analogy

This article explains the subtle difference between concurrency and parallelism using a ground‑hog and cart analogy, shows how task decomposition creates concurrent pipelines, and maps the model to scalable web‑service architecture, referencing Rob Pike’s talk “Concurrency is not Parallelism”.

GoParallelismWeb services
0 likes · 7 min read
Why Concurrency Isn’t the Same as Parallelism: A Simple Analogy
360 Tech Engineering
360 Tech Engineering
Nov 14, 2019 · Backend Development

Building a Simple TCP Port Scanner in Go

This article walks through creating a lightweight TCP port scanner in Go, covering basic TCP handshake theory, single‑port testing, looping over ports, adding concurrency with WaitGroup, implementing timeouts, using the flag package for command‑line options, and handling race conditions with a mutex.

GoNetwork programmingPort Scanner
0 likes · 8 min read
Building a Simple TCP Port Scanner in Go
Programmer DD
Programmer DD
Nov 13, 2019 · Fundamentals

Understanding Processes and Threads: A Factory Analogy Explained

This article uses a factory analogy to demystify operating‑system concepts such as processes, threads, mutual‑exclusion locks, and semaphores, illustrating how CPUs, workspaces, workers, and access controls interact to enable concurrent execution while preventing conflicts.

Operating SystemThreadsconcurrency
0 likes · 5 min read
Understanding Processes and Threads: A Factory Analogy Explained
Java High-Performance Architecture
Java High-Performance Architecture
Nov 8, 2019 · Databases

How to Prevent Redis Key Race Conditions: Optimistic Locks, Distributed Locks, Timestamps & Queues

This article explains the Redis concurrent key competition problem, illustrates typical scenarios where multiple clients modify the same key, and presents four practical solutions—optimistic locking with WATCH/EXEC, distributed locks, timestamp ordering, and message‑queue serialization—to ensure data correctness under high concurrency.

Message Queueconcurrencydistributed-lock
0 likes · 5 min read
How to Prevent Redis Key Race Conditions: Optimistic Locks, Distributed Locks, Timestamps & Queues
Senior Brother's Insights
Senior Brother's Insights
Nov 4, 2019 · Fundamentals

Why Understanding Java Memory Model Boosts Your Code Efficiency

This article explains the hardware memory architecture, the role of caches, and how the Java Memory Model abstracts thread interaction with main and working memory, detailing the eight fundamental JMM operations, their ordering rules, and special considerations for long and double types to help developers write correct, high‑performance concurrent Java code.

CacheJVMMemory Model
0 likes · 11 min read
Why Understanding Java Memory Model Boosts Your Code Efficiency
Programmer DD
Programmer DD
Nov 1, 2019 · Fundamentals

How to Break Java’s Deadlock: From Coffman Conditions to Practical Lock Strategies

This article explains why naive synchronized locks can cause deadlocks in Java, introduces the four Coffman conditions, and presents three practical solutions—acquiring all resources at once, using explicit locks with wait/notify, and ordering lock acquisition—to prevent deadlock in concurrent applications.

LocksSynchronizationcoffman-conditions
0 likes · 9 min read
How to Break Java’s Deadlock: From Coffman Conditions to Practical Lock Strategies
Alibaba Cloud Developer
Alibaba Cloud Developer
Oct 31, 2019 · Backend Development

Why Alibaba’s Wisp2 Makes Java Faster: A Deep Dive into Coroutines and Performance

This article explains how Alibaba’s Wisp2 brings Go‑like coroutine performance to Java by replacing OS thread scheduling, details its design, shows benchmark improvements over traditional thread‑pool models, compares it with Project Loom, and provides practical code snippets for enabling Wisp2 in production.

CoroutinesWisp2asynchronous programming
0 likes · 16 min read
Why Alibaba’s Wisp2 Makes Java Faster: A Deep Dive into Coroutines and Performance
FunTester
FunTester
Oct 27, 2019 · Operations

How to Load Test Multi‑Row Single Updates with Thread‑Safe Queues in Java

This article explains how to perform load testing for scenarios where each row can be updated only once, using a thread‑safe queue to supply unique parameters to concurrent threads, and provides complete Java code examples for both a global queue and per‑thread queues.

Load TestingPerformance TestingQueue
0 likes · 6 min read
How to Load Test Multi‑Row Single Updates with Thread‑Safe Queues in Java
FunTester
FunTester
Oct 26, 2019 · Backend Development

Concurrent Testing Strategy for Updating Limited-Value Fields in Java APIs

The article presents a practical approach for load‑testing API endpoints that modify a database field with a small set of possible values, using per‑thread counters and modulo arithmetic to avoid duplicate parameters, and includes a complete Java demo implementation.

API testingconcurrencyjava
0 likes · 6 min read
Concurrent Testing Strategy for Updating Limited-Value Fields in Java APIs
Python Crawling & Data Mining
Python Crawling & Data Mining
Oct 21, 2019 · Fundamentals

Master Python Multiprocessing: From Fork to Process Pools

This article explains the concepts of processes and threads in Python, compares multi‑process, multi‑thread, and combined approaches, shows how to use fork, the multiprocessing module, process pools, subprocesses, and inter‑process communication with queues, and provides complete code examples with results.

IPCPythonThread
0 likes · 15 min read
Master Python Multiprocessing: From Fork to Process Pools
Tech Musings
Tech Musings
Oct 20, 2019 · Backend Development

How Netty Supercharges ThreadLocal with FastThreadLocal – Inside the Code

This article dissects Netty's custom FastThreadLocal and FastThreadLocalThread implementations, showing how they replace JDK ThreadLocal with constant‑time indexed access, padding to avoid false sharing, and customizable initialization and cleanup to boost backend concurrency performance.

FastThreadLocalNettyThreadLocal
0 likes · 16 min read
How Netty Supercharges ThreadLocal with FastThreadLocal – Inside the Code
Programmer DD
Programmer DD
Oct 17, 2019 · Fundamentals

Why Simple Locks Fail When Protecting Multiple Related Resources

This article explains how using a lock that protects only a single resource can lead to incorrect behavior when multiple related resources are involved, demonstrates the problem with Java synchronized methods, and shows how a class‑level lock resolves the issue.

LocksSynchronizationconcurrency
0 likes · 8 min read
Why Simple Locks Fail When Protecting Multiple Related Resources
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 13, 2019 · Fundamentals

Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Implementing Callable

This article explains three Java thread‑creation techniques—extending the Thread class, implementing the Runnable interface, and implementing the Callable interface—provides complete code examples for each, compares their advantages and disadvantages, and recommends the best practice for concurrent programming.

CallableRunnableThread
0 likes · 6 min read
Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Implementing Callable
Beike Product & Technology
Beike Product & Technology
Sep 20, 2019 · Fundamentals

In‑Depth Analysis of Java ArrayList Implementation

This article provides a comprehensive overview and source‑code dissection of Java's ArrayList, covering its inheritance hierarchy, fields, constructors, addition, removal, modification, traversal, serialization, sorting, array conversion, thread‑safety considerations, and practical usage tips.

ArrayListCollectionsData Structures
0 likes · 16 min read
In‑Depth Analysis of Java ArrayList Implementation
Ziru Technology
Ziru Technology
Sep 19, 2019 · Backend Development

Why LongAdder Beats AtomicLong in High Contention: Deep Dive into Java’s Concurrent Counter

This article explains how java.util.concurrent.atomic.LongAdder provides a more efficient counting mechanism than AtomicLong under high contention, discusses its trade‑offs in space and precision, presents JMH benchmark results, and walks through the internal implementation details such as cells, CAS loops, and hash‑based distribution.

CASJMHatomiclong
0 likes · 13 min read
Why LongAdder Beats AtomicLong in High Contention: Deep Dive into Java’s Concurrent Counter
ITPUB
ITPUB
Sep 17, 2019 · Fundamentals

How a General Deadlock Prediction Algorithm Enhances Linux Lockdep for Read‑Write Locks

This article explains the challenges of deadlock detection in Linux kernel lockdep, especially with read‑write locks, and presents a formally proven general deadlock prediction algorithm that models lock dependencies using a two‑thread abstraction, lemmas, and lock‑type promotion to reliably predict potential deadlocks.

Lockdepalgorithmconcurrency
0 likes · 17 min read
How a General Deadlock Prediction Algorithm Enhances Linux Lockdep for Read‑Write Locks
FunTester
FunTester
Sep 17, 2019 · Backend Development

Building a Multithreaded Java Web Scraper to Harvest 100k Records

After uncovering an unprotected API that allowed unlimited resource access, the author created a rough Java program that uses a fixed-size thread pool and CountDownLatch to fetch 100 000 items in parallel, retrieving 10 000 records per thread via HTTP GET requests.

HTTPWeb Scrapingconcurrency
0 likes · 6 min read
Building a Multithreaded Java Web Scraper to Harvest 100k Records
Programmer DD
Programmer DD
Sep 15, 2019 · Fundamentals

Mastering Concurrency: The Three Core Pillars of Multithreaded Programming

Explore how concurrency can be broken down into three essential problems—division of work, synchronization/coordination, and mutual exclusion—using real‑world analogies and Java examples, and learn practical strategies like appropriate task sizing, thread communication, and locking mechanisms to write efficient, safe multithreaded code.

Synchronizationconcurrencyjava
0 likes · 7 min read
Mastering Concurrency: The Three Core Pillars of Multithreaded Programming
Java Backend Technology
Java Backend Technology
Sep 15, 2019 · Backend Development

8 Ways to Enforce Thread Order in Java: From join to Semaphore

This article explores eight Java concurrency techniques—including join, main‑thread join, wait/notify, thread pools, Condition, CountDownLatch, CyclicBarrier, and Semaphore—to achieve sequential thread execution, complete with code examples and sample outputs for each method.

concurrencyjavasemaphore
0 likes · 22 min read
8 Ways to Enforce Thread Order in Java: From join to Semaphore
Big Data Technology & Architecture
Big Data Technology & Architecture
Sep 13, 2019 · Backend Development

Comprehensive Java Interview Topics: Language Basics, Collections, Concurrency, JVM, Design Patterns, MySQL, and Netty

This article compiles essential Java interview questions covering language fundamentals, core APIs, collections, concurrency mechanisms, JVM internals, design patterns, database concepts, and Netty networking, providing a thorough reference for candidates preparing for backend development positions.

Design PatternsInterview PreparationJVM
0 likes · 12 min read
Comprehensive Java Interview Topics: Language Basics, Collections, Concurrency, JVM, Design Patterns, MySQL, and Netty
Didi Tech
Didi Tech
Sep 3, 2019 · Fundamentals

General Deadlock Prediction Algorithm for Linux Kernel Read‑Write Locks

The paper reverse‑engineers Linux’s Lockdep and introduces a universal deadlock prediction algorithm that treats mutexes as write‑locks of read‑write locks, using a two‑thread model and indirect‑dependency analysis to accurately detect potential deadlocks in complex rwlock scenarios.

Lockdepconcurrencydeadlock
0 likes · 18 min read
General Deadlock Prediction Algorithm for Linux Kernel Read‑Write Locks
Node Underground
Node Underground
Aug 31, 2019 · Backend Development

Mastering Node.js Worker Threads: Boost CPU‑Intensive Tasks

This article explains the architecture of Node.js, the limitations of its single‑threaded event loop for CPU‑heavy workloads, and how the experimental worker_threads module provides a multi‑threaded solution, including core concepts, APIs, best practices, and sample code to improve performance.

CPU-intensiveNode.jsWorker Threads
0 likes · 10 min read
Mastering Node.js Worker Threads: Boost CPU‑Intensive Tasks
Big Data Technology Architecture
Big Data Technology Architecture
Aug 26, 2019 · Backend Development

Redis Distributed Lock Implementation: Design, Issues, and Lessons Learned

This article shares a practical experience of implementing a Redis‑based distributed lock, explains the lock acquisition and release processes, discusses common pitfalls such as expiration handling and concurrency bugs, and provides Q&A on design choices, high‑availability, and future improvements.

Lock designconcurrencydistributed-lock
0 likes · 6 min read
Redis Distributed Lock Implementation: Design, Issues, and Lessons Learned
FunTester
FunTester
Aug 12, 2019 · Backend Development

Detecting Double-Spend Bugs in API Exchanges Using Multithreaded Tests

This article explains the concept of a “double‑spend” bug encountered during a coin‑exchange API, describes a multithreaded testing approach in Java to reproduce the issue, analyzes the root cause of non‑atomic balance checks, and provides sample code illustrating the detection and prevention method.

API testingBackendconcurrency
0 likes · 8 min read
Detecting Double-Spend Bugs in API Exchanges Using Multithreaded Tests
Java Captain
Java Captain
Aug 10, 2019 · Fundamentals

Top 10 Tricky Java Interview Questions and Answers

This article compiles ten of the most challenging Java interview questions, covering topics such as wait/notify placement, lack of multiple inheritance, operator overloading, string immutability, password storage, double‑checked locking singleton, deadlock creation and resolution, serialization pitfalls, and static method overriding, with detailed explanations and code examples.

DesignOOPconcurrency
0 likes · 39 min read
Top 10 Tricky Java Interview Questions and Answers
Java Backend Technology
Java Backend Technology
Jul 29, 2019 · Backend Development

How Redis Powers Distributed Locks: Design, Pitfalls, and Solutions

This article explores the design and implementation of a Redis‑based distributed lock used since 2013, analyzes lock acquisition and release mechanisms, discusses common pitfalls such as expiration handling and race conditions, and presents possible improvements like Lua scripts and Redisson.

concurrencydistributed-lockjava
0 likes · 8 min read
How Redis Powers Distributed Locks: Design, Pitfalls, and Solutions
Java Backend Technology
Java Backend Technology
Jul 26, 2019 · Backend Development

Mastering ThreadLocal: When, How, and Best Practices in Java

This article explains the purpose and usage scenarios of Java's ThreadLocal, details its two main functions for storing thread context and ensuring thread safety, discusses garbage‑collection nuances, presents sample code with results, and outlines essential best‑practice guidelines for safe multithreaded development.

ThreadLocalconcurrencyjava
0 likes · 8 min read
Mastering ThreadLocal: When, How, and Best Practices in Java
Sohu Tech Products
Sohu Tech Products
Jul 24, 2019 · Backend Development

Ten Years of Erlang: Evolution, Knowledge Ladder, and Future Directions

Over the past decade, Erlang has evolved from a niche functional language into a robust platform with powerful concurrency, fault tolerance, and a rich ecosystem, illustrated by its key applications, knowledge ladder, recent improvements, and future prospects for both Erlang and its Elixir community.

ElixirErlangOTP
0 likes · 21 min read
Ten Years of Erlang: Evolution, Knowledge Ladder, and Future Directions
FunTester
FunTester
Jul 24, 2019 · Backend Development

Method‑Based Multithreaded Performance Testing Framework in Java

The article describes a Java performance testing framework that was refactored from a request‑based to a method‑based design, introducing a ThreadBase class and specialized adapters for HTTP requests, database queries, and concurrent execution, and discusses the advantages of code‑based concurrency and Groovy.

GroovyHTTPPerformance Testing
0 likes · 12 min read
Method‑Based Multithreaded Performance Testing Framework in Java
FunTester
FunTester
Jul 23, 2019 · Operations

How to Load Test Dubbo Queue APIs with JMeter and Java Concurrency

This article explains a practical approach to performance‑testing Dubbo add and delete methods of a message queue by pre‑generating payloads, using a thread‑safe LinkedBlockingQueue, and driving the calls with JMeter‑compatible Java code.

DubboJMeterMessage Queue
0 likes · 6 min read
How to Load Test Dubbo Queue APIs with JMeter and Java Concurrency
FunTester
FunTester
Jul 23, 2019 · Operations

Automating Complex API Tests with Groovy: A Modular Script Framework

This article presents a Groovy‑based modular framework for automating complex, interrelated API tests, detailing how to structure test modules, manage user credentials and tokens, and execute concurrent requests using custom thread handling, with full source code examples for the main driver, UserCenter, and base classes.

API testingGroovyScripting
0 likes · 7 min read
Automating Complex API Tests with Groovy: A Modular Script Framework
FunTester
FunTester
Jul 23, 2019 · Backend Development

Method‑Based Multithreaded Performance Testing Framework in Java

The article introduces a Java performance testing framework that shifts from request‑centric to method‑centric design, provides a reusable ThreadBase class, and demonstrates concrete implementations for HTTP requests, database queries, and a concurrent executor to collect timing metrics, while also discussing the merits of coding versus tooling and Groovy advantages.

FrameworkPerformance Testingconcurrency
0 likes · 11 min read
Method‑Based Multithreaded Performance Testing Framework in Java
FunTester
FunTester
Jul 22, 2019 · Fundamentals

Why i++ Is Not Thread‑Safe: A Hands‑On Demo with vmlens

This article demonstrates how the non‑atomic i++ operation can cause race conditions in Java by using the vmlens tool to visualize thread interleavings, providing sample test code, Maven configuration, and an analysis of the resulting report.

concurrencyjavamultithreading
0 likes · 6 min read
Why i++ Is Not Thread‑Safe: A Hands‑On Demo with vmlens
FunTester
FunTester
Jul 22, 2019 · Fundamentals

Why a Simple Increment Isn’t Thread‑Safe: A Java Concurrency Demo

This article explains atomicity, thread safety, and race conditions in Java by showing how a volatile counter increment can produce nondeterministic results when accessed concurrently, complete with sample code and console output analysis.

atomicityconcurrencyexample
0 likes · 4 min read
Why a Simple Increment Isn’t Thread‑Safe: A Java Concurrency Demo
FunTester
FunTester
Jul 22, 2019 · Backend Development

Thread Safety Issues When Combining Thread‑Safe Methods: A ConcurrentHashMap Example

Even when using thread‑safe classes like Java's ConcurrentHashMap, combining multiple thread‑safe methods into a single operation can still cause race conditions, as demonstrated by a test where two threads concurrently execute get‑and‑put logic, leading to an unexpected map value and a failed assertion.

ConcurrentHashMapconcurrencyjava
0 likes · 3 min read
Thread Safety Issues When Combining Thread‑Safe Methods: A ConcurrentHashMap Example
FunTester
FunTester
Jul 18, 2019 · Backend Development

Load Testing Dubbo Queue Service Using Java Concurrency and JMeter

This article describes how to conduct load testing of Dubbo queue service methods for adding and deleting messages using Java concurrency utilities and JMeter, including code examples for constructing test data, managing a thread‑safe LinkedBlockingQueue, and handling initialization challenges during repeated test runs.

DubboMessage Queueconcurrency
0 likes · 5 min read
Load Testing Dubbo Queue Service Using Java Concurrency and JMeter
FunTester
FunTester
Jul 16, 2019 · Fundamentals

Why Incrementing a Counter Isn’t Thread‑Safe in Java: A Hands‑On Demo

This article explains atomicity, thread safety, and thread‑unsafe behavior in Java, demonstrates a simple class with a volatile counter, runs two concurrent threads that increment it, shows the non‑atomic nature of i++, and analyzes why the final value may remain 1.

atomicityconcurrencyjava
0 likes · 4 min read
Why Incrementing a Counter Isn’t Thread‑Safe in Java: A Hands‑On Demo
FunTester
FunTester
Jul 14, 2019 · Fundamentals

Why a Simple Increment Fails in Multithreaded Java: A Concurrency Demo

This article explains atomicity, thread safety, and race conditions in Java by walking through a concrete example where multiple threads increment a shared volatile variable, showing why the non‑atomic i++ operation leads to inconsistent results.

atomicityconcurrencyexample
0 likes · 4 min read
Why a Simple Increment Fails in Multithreaded Java: A Concurrency Demo
JD Retail Technology
JD Retail Technology
Jul 12, 2019 · Databases

Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control

This article explains MySQL's lock types—including table and row locks, InnoDB's shared, exclusive, and intention locks—covers lock algorithms such as record, gap, next‑key, and insert‑intention locks, discusses deadlock and blocking issues, and details transaction management, isolation levels, and related configuration parameters.

ACIDInnoDBIsolation
0 likes · 39 min read
Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jul 4, 2019 · Backend Development

Java Multithreading: Creation Methods, Lifecycle, Communication, Thread Pools, Locks, and Concurrent Containers

This article introduces Java multithreading fundamentals, covering four thread creation techniques, the five-stage thread lifecycle, communication methods, thread‑pool usage, common synchronization locks, and the main concurrent container classes for building high‑performance backend applications.

ConcurrentContainersLocksThreadPool
0 likes · 2 min read
Java Multithreading: Creation Methods, Lifecycle, Communication, Thread Pools, Locks, and Concurrent Containers
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jun 24, 2019 · Backend Development

Understanding Java Thread Locks: synchronized, ReentrantLock, Semaphore, and AtomicInteger

This article explains why multithreading is needed, outlines the challenges of concurrent access, and provides a detailed overview of four Java thread lock mechanisms—synchronized, ReentrantLock, Semaphore, and AtomicInteger—along with their characteristics, usage patterns, and performance considerations.

AtomicIntegerThread Locksconcurrency
0 likes · 9 min read
Understanding Java Thread Locks: synchronized, ReentrantLock, Semaphore, and AtomicInteger
Java Backend Technology
Java Backend Technology
Jun 24, 2019 · Backend Development

What I Learned from 2 Months of Java Backend Interviews: Tips & Insights

Over two months, I interviewed with multiple companies for Java backend roles, sharing detailed experiences from technical rounds—covering JVM, concurrency, distributed locks, databases, and system design—to highlight key questions, effective answers, and practical advice for succeeding in similar backend development interviews.

Distributed SystemsJVMconcurrency
0 likes · 17 min read
What I Learned from 2 Months of Java Backend Interviews: Tips & Insights
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 19, 2019 · Backend Development

What’s New in the Updated Java Development Handbook? 21 Rules, Lock Pitfalls, and Float Tricks

The latest Java Development Handbook introduces 21 new coding rules, revises over a hundred guidelines, and adds clearer examples on lock handling, switch‑null checks, floating‑point comparisons, collection conversions, and guard statements, while inviting developers to download the free PDF and join a live discussion.

Code Examplescoding standardsconcurrency
0 likes · 9 min read
What’s New in the Updated Java Development Handbook? 21 Rules, Lock Pitfalls, and Float Tricks
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 19, 2019 · Backend Development

Explore the Updated Java Development Handbook: 21 New Rules & Key Code Pitfalls

The newly released Java Development Handbook introduces three major upgrades—21 new coding rules, over a hundred revisions, and richer examples—while offering practical guidance on lock handling, switch NPE avoidance, floating‑point comparisons, guard statements, and other common Java pitfalls, all available for free download.

coding standardsconcurrencyfloating-point
0 likes · 9 min read
Explore the Updated Java Development Handbook: 21 New Rules & Key Code Pitfalls
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 17, 2019 · Fundamentals

5 Tricky Java Questions That Reveal Hidden Pitfalls

This article presents five Java code snippets—covering floating‑point comparison, wrapper equality, switch handling of null, BigDecimal construction, and lock usage—and challenges readers to identify the correct outcomes, exposing common misconceptions and best‑practice solutions.

BigDecimalconcurrencyfloating-point
0 likes · 4 min read
5 Tricky Java Questions That Reveal Hidden Pitfalls
Sohu Tech Products
Sohu Tech Products
Jun 5, 2019 · Backend Development

Understanding RxJava2 Backpressure Strategies and Flowable Implementation

This article explains RxJava2's backpressure mechanisms, compares the five Flowable strategies (MISSING, ERROR, BUFFER, DROP, LATEST), demonstrates their behavior with practical experiments, and shows how to use Subscription and FlowableEmitter to build a demand‑driven, memory‑safe data pipeline.

FlowableRxJavabackpressure
0 likes · 20 min read
Understanding RxJava2 Backpressure Strategies and Flowable Implementation
21CTO
21CTO
May 24, 2019 · Backend Development

How Many Threads Can a JVM Actually Support? Limits, Factors, and Real-World Tests

The maximum number of Java Virtual Machine threads depends on CPU, operating system, JVM version, memory allocation, and configuration, with practical limits ranging from a few thousand on modest hardware to over ten thousand on high‑end systems, as demonstrated by several real‑world experiments.

JVMMemoryThreads
0 likes · 5 min read
How Many Threads Can a JVM Actually Support? Limits, Factors, and Real-World Tests
Java Captain
Java Captain
May 24, 2019 · Backend Development

Understanding Java Blocking I/O, NIO, and AIO: From Per‑Connection Threads to Multiplexed and Asynchronous I/O

This article explains how traditional per‑connection thread handling (blocking I/O) wastes resources, then demonstrates Java NIO multiplexing and AIO callbacks with complete code examples, showing how they reduce thread usage and eliminate blocking while processing many simultaneous socket connections.

AIOBlocking IOMultiplexing
0 likes · 35 min read
Understanding Java Blocking I/O, NIO, and AIO: From Per‑Connection Threads to Multiplexed and Asynchronous I/O