Tagged articles
ParallelStream
16 articles · Page 1 of 1
A production timeout incident caused by unbounded CompletableFuture.get() calls and shared thread pools leads to a comprehensive guide on proper thread pool configuration, isolation, timeout handling, ThreadLocal cleanup, dynamic queue sizing, core thread calculation formulas, and ParallelStream pitfalls.
CompletableFutureConcurrencyJava
0 likes · 17 min read

The article dissects Java 8‑10 core features—revealing that Lambda is powered by invokedynamic rather than anonymous classes, exposing the danger of default parallelStream blocking the common ForkJoinPool in I/O‑heavy code, and offering concrete best‑practice guidelines for Optional, var, and collection factory usage.
CollectionFactoryJavaOptional
0 likes · 17 min read

This article examines how Java Stream and Lambda, while powerful for concise data processing, can become cumbersome when misused, and provides practical tips such as proper line breaks, function extraction, careful filter logic, safe Optional handling, and cautious use of parallel streams to keep code readable and maintainable.
Best PracticesJavaOptional
0 likes · 10 min read

The article examines how Java Stream and Lambda, while powerful for concise code, can become cumbersome when overused, and offers practical tips such as proper line breaks, function extraction, predicate reuse, cautious Optional handling, and mindful use of parallel streams to maintain readability and performance.
BestPracticesCodeOptimizationJava
0 likes · 11 min read

The article examines how Java Stream and Lambda, while designed for concise and expressive code, often become sources of unreadable and hard‑to‑maintain implementations, and it offers concrete refactoring techniques, proper use of Optional, and cautions about ParallelStream performance.
Code styleOptionalParallelStream
0 likes · 8 min read

This article explains how Java's parallelStream uses the shared ForkJoinPool, why developers may need to customize the thread pool for better performance and isolation, and provides two approaches—setting the system property and creating a dedicated ForkJoinPool—along with complete code examples and execution results.
ConcurrencyForkJoinPoolJava
0 likes · 4 min read

This article compares Java 8 Streams with traditional for‑loops through concrete code examples, benchmark results, parallel‑stream speedups, and discusses scenarios where Streams excel or fall short, helping developers decide when to prefer Streams over loops.
Code ReadabilityJavaParallelStream
0 likes · 10 min read

The brief explains how Lombok’s @Builder can clash with JSON libraries and how adding no‑args and all‑args constructors resolves it, shows how to adjust log levels at runtime via Arthas or Spring’s LoggingSystem, outlines JWT structure and security cautions, and warns of common Java 8 parallelStream performance and correctness pitfalls.
JSONJWTJava
0 likes · 9 min read

This article details a step‑by‑step optimization of a Java backend that imports massive Excel files into MySQL, covering library switches, data caching, batch INSERT statements, and parallel stream insertion to cut processing time from minutes to under two minutes.
BatchInsertExcelJava
0 likes · 11 min read

This article explores twelve practical multithreading use cases in Java, ranging from simple scheduled tasks and listeners to Excel imports, remote call aggregation, user context handling, MDC logging, high‑concurrency simulation, Kafka message processing, atomic counters, and delayed jobs, providing code examples and best‑practice tips for each scenario.
ConcurrencyJavaMultithreading
0 likes · 25 min read

An Excel import that partially succeeds reveals a hidden bug where Spring’s @Transactional annotation doesn’t roll back when using Java 8’s parallelStream, and the article explains the underlying thread‑local transaction mechanics, demonstrates the issue with code, and offers practical solutions and best‑practice guidelines.
ConcurrencyJavaParallelStream
0 likes · 8 min read

This article walks through a step‑by‑step optimization of a Java‑based Excel import pipeline, covering the transition from raw POI to EasyPOI and EasyExcel, caching database lookups, batch inserts, optimal batch sizes, parallel streams, and logging reductions to achieve sub‑minute import times for hundreds of thousands of rows.
BackendEasyExcelExcel
0 likes · 12 min read

This article details a step‑by‑step optimization of a Java backend Excel import pipeline, covering data validation caching, batch insertion with MySQL VALUES, switching to EasyExcel, parallel stream insertion, and logging reduction to achieve sub‑minute import times for hundreds of thousands of rows.
EasyExcelExcelJava
0 likes · 11 min read

This tutorial explains how to implement a Redis distributed lock with SpringBoot and Jedis, covering lock creation using SETNX, expiration handling, safe unlocking via Lua scripts, and a 100,000‑user parallelStream simulation of a limited‑stock order‑grab scenario, complete with code samples and results.
ConcurrencyDistributed LockJava
0 likes · 10 min read

This article explores the evolution of parallel computing in Java, explaining why single‑core performance stalls, how multi‑core CPUs and GPUs enable true concurrency, and demonstrating practical implementations using CountDownLatch, CompletableFuture, Fork/Join, parallel streams, and sharding, while highlighting performance considerations and pitfalls.
CompletableFutureCountDownLatchForkJoinPool
0 likes · 15 min read

This article presents a comprehensive performance evaluation of Java's ExecutorService, Fork/Join framework, and Parallel Streams across CPU‑intensive and I/O‑intensive tasks, analyzing thread‑count effects, default pool limitations, and JVM tuning to guide optimal concurrency choices.
ExecutorServiceForkJoinJava
0 likes · 9 min read
