Modern Concurrency in Java
Virtual Threads, Structured Concurrency, and BeyondA N M Bazlur Rahman
- ناشرO'Reilly
- سال انتشار2025
- ویرایش1
- زبانEnglish
- تعداد صفحات337
- شابک9781098165413
838,000 تومان – 2,019,000 تومانمحدوده قیمت: 838,000 تومان تا 2,019,000 تومان
تحویل اکسپرس
حمل رایگان سفارشات بالای 1 میلیون تومان
پرداخت امن
امکان پرداخت انلاین یا پرداخت حضروی درب منزل
ضمانت اصالت کالا
امکان پرداخت انلاین یا پرداخت حضروی درب منزل
7 روز گارانتی بازگشت وجه
امکان پرداخت انلاین یا پرداخت حضروی درب منزل
🚀 به آینده Java خوش آمدید. با این کتاب، شما وارد دنیای تحولآفرین یکی از کلیدیترین قابلیتهای Java 21 میشید: تردهای مجازی (Virtual threads). چالشها و سردردهای قدیمی مثل هزینه بالای ساخت ترد، محدودیتهای اسکیلپذیری و دستوپنجه نرم کردن با رسیدن به Throughput بالا رو یادتونه؟ اون روزها دیگه تموم شده. این راهنمای کاربردی شما رو از جاوا ۱.۰ به پیشرفتهترین دستاوردهای پروژه لوم (Project Loom) میبره.
💻 شما تو این کتاب فقط تئوری یاد نمیگیرید. نویسنده کتاب، بانیور رحمان، شما رو با یک تولکیت کاملاً کاربردی برای پروژههای دنیای واقعی مجهز میکنه. یک Dive عمیق خواهید داشت به پیچیدگیهای تردهای مجازی و مباحث سنگینی مثل ForkJoinPool، کانتینیویشن (Continuation)، محدود کردن نرخ درخواست (Rate limiting)، دیباگ و مانیتورینگ. شما نه تنها یاد میگیرید این مفاهیم چطور کار میکنند، بلکه نکات و ترفندهای حرفهای رو برای مستر شدن تو اونا یاد میگیرید. علاوه بر این، با همزمانی ساختاریافته (Structured concurrency) و Scoped values آشنا میشید—که مهارتهایی حیاتی برای ساخت اپلیکیشنهای جاوا اسکیلپذیر و بهینه هستن.
⚙️ رسیدن به درک عمیق و جامع از تردهای مجازی (Virtual threads)
🧠 درک نحوه پیادهسازی و ساختار داخلی تردهای مجازی
⚡ بهبود چشمگیر پرفورمنس در عملیاتهای بلاکینگ (Blocking operations)
🔄 یادگیری اینکه چرا همزمانی ساختاریافته (Structured concurrency) اینقدر کاربردی و مفیده
📍 شناخت دقیق جاهایی که باید از Scoped value استفاده کرد
🤖 درک جایگاه جاوای رایکتیو (Reactive Java) با ظهور تردهای مجازی
📑 فهرست مطالب
فصل ۱. مقدمه
فصل ۲. درک تردهای مجازی
فصل ۳. مکانیسم همزمانی مدرن در جاوا
فصل ۴. همزمانی ساختاریافته
فصل ۵. مقادیر اسکوپشده (Scoped Values)
فصل ۶. جایگاه جاوای رایکتیو در حضور تردهای مجازی
فصل ۷. فریمورکهای مدرن بهرهمند از تردهای مجازی
فصل ۸. نتیجهگیری و دستاوردها
👥 این کتاب برای چه کسانی است
🎯 این کتاب برای Java developerهایی دیزاین شده که از قبل یک درک پایهای و قوی از مفاهیم همزمانی (Concurrency) و مالتیثردینگ (Multithreading) دارن. این اثر اصلاً یک راهنمای مقدماتی برای این موضوعات نیست؛ بلکه دقیقاً کسانی رو تارگت قرار داده که تجربه نوشتن برنامههای همزمان با ابزارهای سنتی مثل Thread، ExecutorService، سینکرونیزاسیون و ابزارهای کالکشن مثل ReentrantLock و Semaphore رو دارن و حالا میخوان درک خودشون رو از قابلیتهای مدرن همزمانی در نسخههای جدید جاوا—بهویژه تردهای مجازی، همزمانی ساختاریافته و مقادیر اسکوپشده—عمیقتر کنن. اگه میخواد پایههای همزمانی رو یاد بگیرید، کتاب Java Concurrency in Practice اثر برایان گوتز هنوز هم بهترین گزینه پیشنهادیه.
⚠️ اگه تا حالا با چالشهایی مثل اتمام ظرفیت تردها (Thread exhaustion)، بلاک شدن I/O، تیون کردن تردپولها یا مدیریت لایفسایکل و منطق کنسل کردن پروسسهای پیچیده دستوپنجه نرم کردید، این کتاب بهتون کمک میکنه با نگاهی نو و با توجه به مدل همزمانی در حال تکامل جاوا به این مسائل نگاه کنید. این کتاب به طور خاص برای این افراد مفیده:
- دولوپرهای سطح متوسط تا سینیور که هدفشون مدرنسازی کدهای همزمان خودشونه
- آرکتیکتهایی که سیستمهای اسکیلپذیر دیزاین میکنند
- مهندسهای پرفورمنسمحور که علاقهمند به ساخت اپلیکیشنهای همزمان مستحکم هستن
- تیملیدهایی که در حال ارزیابی تکنولوژیهای جدید هستن
- هر کسی که کنجکاوِ بدون بزرگراه همزمانی جاوا داره به کدوم سمت میره
💡 دولوپرهای جونیور هم که یک درک پایهای از جاوا دارن میتونن از این کتاب برای گرفتن یک اورویو کلی از همزمانی مدرن استفاده کنن. با این حال، مطالعه قبلی یا همزمان موضوعات پایهای مثل سینکرونیزاسیون، شرایط مسابقه (Race conditions) و نحوه انتشار داتا برای درک کامل کتاب کاملاً توصیه میشه. این پایهها برای نوشتن کدهای همزمان بهینه توی اپلیکیشنهاتون حیاتی هستن. در حالی که بعضی فریمورکهای مدرن این جزئیات رو از چشم دولوپرها پنهان میکنند، ولی وقتی با یک باگ جدی تو محیط پروداکشن روبهرو بشید، همهچیز حیاتی میشه. دانش پایهای همیشه برای فهم موضوع واجبه و همزمانی هم از این قاعده مستثنی نیست.
🧠 آنچه این کتاب ارائه میدهد
📚 این کتاب تمام چیزهایی رو که من درباره پروژه لوم و تردهای مجازی یاد گرفتم رو در یک منبع جامع جمعآوری کرده. در داخل کتاب پیدا خواهید کرد:
- بررسی مسیر تکامل همزمانی جاوا، از تردهای پلتفرم و فریمورک Executor گرفته تا
CompletableFutureو برنامهنویسی رایکتیو - یک Dive عمیق به مکانیسم تردهای مجازی، همزمانی ساختاریافته و مقادیر اسکوپشده
- مثالهای کاربردی و دنیای واقعی که نشون میدن چطور از این قابلیتهای جدید به شکل موثری استفاده کنید
- پوشش گسترده و جامع نه فقط برای تردهای مجازی، بلکه برای همزمانی ساختاریافته و مقادیر اسکوپشده
- راهنمایی درباره اینکه چطور فریمورکهای مدرن مثل Spring Boot، Quarkus و Jakarta EE دارن تردهای مجازی رو در خودشان ادغام میکنند
🏁 چه تازه با تردهای مجازی آشنا شده باشید و چه پروژه لوم رو از همان مراحل ابتدایی دنبال کرده باشید، این کتاب بینشهای ارزشمند و دانش عملی زیادی رو بهتون میده. مثالها و مفاهیم این کتاب حداقل به JDK 21 نیاز دارن، چون تردهای مجازی از این نسخه رسماً در دسترس قرار گرفتن. با این حال، برخی چپترها قابلیتهایی رو بررسی میکنند که هنوز در حالت پریویو هستن یا به تازگی نهایی شدن؛ بنابراین داشتن دسترسی به نسخههای جدیدتر JDK مثل ۲۴ یا حتی ۲۵ بهتون کمک میکنه بیشترین بهره رو از تمام مثالها و بحثها ببرید.
👨💻 درباره نویسنده
👨💻 ای ان ام بانیور رحمان یک مهندس نرمافزار با بیش از یک دهه تجربه تخصصی در Java و تکنولوژیهای وابسته به اونه. اون یک سخنران فعال در کنفرانسهای بینالمللی و گروههای کاربری جاواست و ارائههاش اغلب روی موضوعات تخصصی مثل همزمانی و تردهای مجازی تمرکز داشته. اون عنوان افتخاری Java Champion رو داره و ادیتور بخش Java Queue در رسانههای InfoQ و Foojay.io هست. اون همچنین بنیانگذار و مودریتور فعلی گروه کاربری جاوا در بنگلادش هست که از سال ۲۰۱۳ میتآپها و کنفرانسهای آموزشی مختلفی رو سازماندهی کرده.
Welcome to the future of Java. With this book, you’ll explore the transformative world of Java 21’s key feature: virtual threads. Remember struggling with the cost of thread creation, encountering limitations on scalability, and facing difficulties in achieving high throughput? Those days are over. This practical guide takes you from Java 1.0 to the cutting-edge advancements of Project Loom.
You’ll learn more than just theory. Author A N M Bazlur Rahman equips you with a toolkit for taking real-world action. Take a deep dive into the intricacies of virtual threads and complex topics such as ForkJoinPool, continuation, rate limiting, debugging, and monitoring. You’ll not only learn how they work, but you’ll also pick up expert tips and tricks to help you master these concepts. And you’ll learn about structured concurrency and scoped values—critical skills for building Java applications that are scalable and efficient.
- Get an in-depth understanding of virtual threads
- Understand the implementation of virtual thread internals
- Gain performance improvement in blocking operations
- Learn why structured concurrency is beneficial
- Know where to use scoped value
- Understand the relevance of reactive Java with the advent of virtual threads
Table of Contents
Chapter 1. Introduction
Chapter 2. Understanding Virtual Threads
Chapter 3. The Mechanics of Modern Concurrency in Java
Chapter 4. Structured Concurrency
Chapter 5. Scoped Values
Chapter 6. The Relevance of Reactive Java in Light of Virtual Threads
Chapter 7. Modern Frameworks Utilizing Virtual Threads
Chapter 8. Conclusion and Takeaways
Who This Book Is For
This book is designed for Java developers who already possess a foundational understanding of concurrency and multithreading. It is not a beginner’s guide to these topics. Instead, it targets those who have experience writing concurrent programs using traditional tools, such as Thread, ExecutorService, synchronization, and collection utilities like ReentrantLock and Semaphore, and are looking to deepen their understanding of the modern concurrency features introduced in recent Java releases, particularly virtual threads, structured concurrency, and scoped values. If you’re looking to learn the fundamentals of concurrency, Java Concurrency in Practice by Brian Goetz (Addison-Wesley Professional) is still the recommended book.
If you’ve ever encountered challenges with thread exhaustion, blocking I/O, thread pool tuning, or managing complex lifecycle and cancellation logic, this book will help you rethink these issues in light of Java’s evolving concurrency model. It is particularly beneficial for:
- Mid- to senior-level developers aiming to modernize their concurrent code
- Architects designing scalable systems
- Performance-oriented engineers interested in building robust concurrent applications
- Team leads assessing new technologies
- Anyone curious about the future of Java concurrency
Junior developers with a basic understanding of Java will also find this book useful for an overview of modern concurrency. However, a prior or concurrent study of foundational topics such as synchronization, race conditions, and data publishing is highly recommended for a complete understanding. These fundamentals are vital for effectively writing concurrent code in your applications. While some modern frameworks hide these details from everyday developers, things become critical when encountering a serious bug. Fundamental knowledge is always essential for understanding the subject, and concurrency is no exception.
What This Book Offers
This book consolidates everything I’ve learned about Project Loom and virtual threads into one comprehensive resource. Inside, you will find:
- An exploration of Java’s concurrency evolution, from platform threads and the Executor framework to CompletableFuture and reactive programming
- A deep dive into the mechanics of virtual threads, structured concurrency, and scoped values
- Practical, real-world examples that demonstrate how to apply these new features effectively
- Extensive coverage of not only virtual threads but also structured concurrency and scoped values
- Guidance on how modern frameworks like Spring Boot, Quarkus, and Jakarta EE are integrating virtual threads
Whether you are new to virtual threads or have been following Project Loom from its inception, you will discover valuable insights and practical knowledge.
The examples and concepts in this book require at least JDK 21, as that is when virtual threads became officially available. However, some chapters discuss features that are still in preview or have been recently finalized. Therefore, having access to a newer JDK version, such as 24 or even 25, will enable you to make the most of all the examples and discussions.
About the Author
A N M Bazlur Rahman is a Software Engineer with over a decade of specialized experience in Java and related technologies. An active speaker at various international conferences and Java user groups, his talks have often focused on specialized topics such as concurrency and virtual threads. He is a Java Champion and an editor for Java Queue at InfoQ and Foojay.io. He is the founder and current moderator of the Java User Group in Bangladesh, where he has organized educational meetups and conferences since 2013.
| ناشر | O’Reilly |
|---|---|
| ویرایش | 1 |
| زبان | English |
| سال انتشار | 2025 |
| شابک | 9781098165413 |
| تعداد صفحات | 337 |
| قطع | B5 |
| کیفیت | اورجینال انتشارات |
| نوع چاپ | رنگی, سیاه و سفید |
| نوع جلد | جلد سخت, شومیز, طلقی |
محصولات مشابه

نقد و بررسیها
هنوز بررسیای ثبت نشده است.