
Concurrent Patterns and Best Practices
Build scalable apps with patterns in multithreading, synchronization, and functional programming
- 264 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Concurrent Patterns and Best Practices
Build scalable apps with patterns in multithreading, synchronization, and functional programming
About this book
A definitive guide to mastering and implementing concurrency patterns in your applications
Key Features
- Build scalable apps with patterns in multithreading, synchronization, and functional programming
- Explore the parallel programming and multithreading techniques to make the code run faster
- Efficiently use the techniques outlined to build reliable applications
Book Description
Selecting the correct concurrency architecture has a significant impact on the design and performance of your applications. This book explains how to leverage the different characteristics of parallel architecture to make your code faster and more efficient.
To start with, you'll understand the basic concurrency concepts and explore patterns around explicit locking, lock free programming, futures & actors. Then, you'll get insights into different concurrency models and parallel algorithms and put them to practice in different scenarios to realize your application's true potential. We'll take you through multithreading design patterns, such as master, slave, leader, follower, map-reduce, and monitor, also helping you to learn hands-on coding using these patterns.
Once you've grasped all of this, you'll move on to solving problems using synchronizer patterns. You'll discover the rationale for these patterns in distributed & parallel applications, followed by studying how future composition, immutability and the monadic flow help create more robust code.
Toward the end of the book, you'll learn about the actor paradigm and actor patterns - the message passing concurrency paradigm.
What you will learn
- Explore parallel architecture
- Get acquainted with concurrency models
- Internalize design themes by implementing multithreading patterns
- Get insights into concurrent design patterns
- Discover design principles behind many java threading abstractions
- Work with functional concurrency patterns
Who this book is for
This is a must-have guide for developers who want to learn patterns to build scalable and high-performing apps. It's assumed that you already have a decent level of programming knowledge.
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
Thread Pools
- More patterns for staying away from explicit locking and state management
- Thread pooling— need and notion
- Executor service
- Fork-join
- Active object design pattern
Thread pools

public static void main(String[] args) {
ExecutorService executorService = Executors.newFixedThreadPool(10);
executorService.execute(new Runnable() {
public void run() {
System.out.println("Hey pool!");
}
});
executorService.shutdown();
}


The command design pattern
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- Concurrency – An Introduction
- A Taste of Some Concurrency Patterns
- More Threading Patterns
- Thread Pools
- Increasing the Concurrency
- Functional Concurrency Patterns
- Actors Patterns
- Other Books You May Enjoy
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app