<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Concurrency on YennJ12 Engineering Blog</title><link>https://yennj12.js.org/yennj12_blog_V4/tags/concurrency/</link><description>Recent content in Concurrency on YennJ12 Engineering Blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 04 Jun 2026 15:00:00 +0800</lastBuildDate><atom:link href="https://yennj12.js.org/yennj12_blog_V4/tags/concurrency/feed.xml" rel="self" type="application/rss+xml"/><item><title>Java Concurrency Deep Dive Part 2: Mastering Runnable, Callable Patterns and Internal Mechanisms</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-deep-dive-runnable-callable-patterns-part2/</link><pubDate>Tue, 28 Jan 2025 03:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-deep-dive-runnable-callable-patterns-part2/</guid><description>🎯 Introduction Building upon our comprehensive overview of Java concurrency, this deep dive explores the fundamental building blocks that power Java&amp;rsquo;s threading mechanisms. We&amp;rsquo;ll dissect the internals of Runnable and Callable interfaces, examine thread synchronization primitives, understand the Java Memory Model, and explore advanced patterns that form the foundation of robust concurrent applications.
This technical deep dive is essential for developers who want to understand not just how to use Java&amp;rsquo;s concurrency tools, but how they work under the hood and how to leverage them effectively in complex scenarios.</description></item><item><title>Java Concurrency Part 3: Design Patterns with Thread Interfaces - Producer-Consumer, Observer, and Enterprise Patterns</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-design-patterns-thread-interfaces-part3/</link><pubDate>Tue, 28 Jan 2025 04:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-design-patterns-thread-interfaces-part3/</guid><description>🎯 Introduction Building upon our deep dive into Java concurrency fundamentals, this third part explores how classic design patterns can be elegantly implemented using thread interfaces. We&amp;rsquo;ll examine how Runnable, Callable, and other concurrency primitives can be combined with design patterns to create robust, scalable, and maintainable concurrent systems.
This guide demonstrates practical implementations of essential design patterns in concurrent environments, showing how threading interfaces enhance traditional patterns while addressing the unique challenges of multi-threaded programming.</description></item><item><title>FDE 面試準備指南（二十二）：RKK 實戰——動態並行 Tool-Calling 與依賴解析引擎</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part22-parallel-tool-calling-zh/</link><pubDate>Thu, 04 Jun 2026 15:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part22-parallel-tool-calling-zh/</guid><description>LLM 說「我需要查 User Profile、Order History、Risk Score」。
最差的工程師說：「好，我一個一個查。」
FDE 說：「三個互相獨立——我同時查，總延遲從 T₁+T₂+T₃ 降到 max(T₁,T₂,T₃)。」
這就是這題考的核心思維。
面試情境 面試官： 「Gemini 判定需要同時呼叫三個工具：get_user_profile、get_order_history、get_risk_score。這三個工具執行時間不同。有時候工具 B 的輸入必須依賴工具 A 的輸出。你如何設計動態工具執行引擎最大化並行，並處理這種動態依賴關係？」
一、核心問題：順序執行的延遲代價 場景：LLM 決定需要呼叫三個工具 get_user_profile → 150ms get_order_history → 400ms get_risk_score → 300ms 順序執行（最差的方案）： 時間軸： 0 150 550 850ms │─────│─────│─────│ [Profile] [Orders] [Risk] Total: 150 + 400 + 300 = 850ms 並行執行（最優方案，如果互相獨立）： 時間軸： 0 400ms │─────────────────│ [Profile 150ms] [Orders 400ms ] ← 決定總延遲 [Risk 300ms ] Total: max(150, 400, 300) = 400ms（節省 53%） 在 Multi-turn Agent 中，每次推理前的 Tool 執行延遲會直接累積到 E2E 延遲：</description></item><item><title>Java Learning Journey: Fundamentals to Advanced</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/comprehensive-java-learning-journey-fundamentals-to-advanced/</link><pubDate>Sat, 27 Sep 2025 10:00:00 +0000</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/comprehensive-java-learning-journey-fundamentals-to-advanced/</guid><description>Complete exploration of Java programming concepts through practical examples, covering core language features, object-oriented principles, design patterns, modern frameworks, and advanced topics like reactive programming and microservices.</description></item><item><title>Java Concurrency and Threading: Complete Guide to Runnable, Callable, and Modern Thread Patterns</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-threading-runnable-callable-guide/</link><pubDate>Tue, 28 Jan 2025 02:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/java-concurrency-threading-runnable-callable-guide/</guid><description>🎯 Introduction Concurrency and threading are fundamental aspects of modern Java applications, enabling programs to perform multiple tasks simultaneously and efficiently utilize system resources. As applications become more complex and performance requirements increase, understanding Java&amp;rsquo;s threading mechanisms becomes crucial for building scalable, responsive applications.
This comprehensive guide explores Java&amp;rsquo;s concurrency landscape, from basic threading concepts to advanced patterns, providing practical implementations and performance insights for enterprise applications.
🧵 Java Threading Fundamentals 🔍 Understanding Threads and Concurrency A thread is a lightweight sub-process that allows concurrent execution of multiple tasks within a single program.</description></item><item><title>Data Consistency Patterns in Java Enterprise Applications</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/data-consistency-patterns-java-enterprise-applications/</link><pubDate>Tue, 28 Jan 2025 00:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/data-consistency-patterns-java-enterprise-applications/</guid><description>🎯 Introduction Data consistency is one of the most critical challenges in modern Java enterprise applications. As systems scale and become distributed, maintaining data integrity while ensuring performance becomes increasingly complex. This comprehensive guide explores practical data consistency patterns implemented in real-world Java applications, complete with case studies, implementation details, and detailed trade-off analysis.
📊 The Data Consistency Challenge 🔍 Understanding Data Consistency Levels Data consistency refers to the guarantee that all nodes in a distributed system see the same data at the same time.</description></item></channel></rss>