3 options
Mastering concurrency programming with Java 8 : master the principles and techniques of multithreaded programming with the Java 8 Concurrency API / Javier Fernǹdez González.
- Format:
- Book
- Author/Creator:
- Fernández González, Javier, author.
- Series:
- Community experience distilled.
- Community experience distilled
- Language:
- English
- Subjects (All):
- Java (Computer program language).
- Functional programming (Computer science).
- Physical Description:
- 1 online resource (430 p.)
- Edition:
- 1st edition
- Place of Publication:
- Birmingham : Packt Publishing, 2016.
- System Details:
- text file
- Biography/History:
- Gonzalez Javier Fernandez: Javier Fernandez is a software architect with almost 15 years experience with Java technologies. He has worked as a teacher, researcher, programmer, analyst, writer and now as an architect in all types of projects related to Java, especially J2EE. As a teacher, has taught over 1000 hours of training in basic Java, J2EE and Struts framework. As a researcher, has worked in the field of information retrieval developing applications for processing large amounts of data in Java and has participated as co-author on several journal articles and conference presentations. In recent years, has worked on developing J2EE web applications for various clients from different sectors (public administration, insurance, healthcare, transportation, .. .). Currently he works as a software architect at Capgemini developing and maintaining applications for an insurance company. He is the author of the book Java 7 Concurrency Cookbook.
- Summary:
- Master the principles and techniques of multithreaded programming with the Java 8 Concurrency API About This Book Implement concurrent applications using the Java 8 Concurrency API and its new components Improve the performance of your applications or process more data at the same time, taking advantage of all of your resources. Construct real-world examples related to machine learning, data mining, image processing, and client/server environments Who This Book Is For If you are a competent Java developer with a good understanding of concurrency but have no knowledge of how to effectively implement concurrent programs or use streams to make processes more efficient, then this book is for you. What You Will Learn Design concurrent applications by converting a sequential algorithm into a concurrent one Discover how to avoid all the possible problems you can get in concurrent algorithms Use the Executor framework to manage concurrent tasks without creating threads Extend and modify Executors to adapt their behavior to your needs Solve problems using the divide and conquer technique and the Fork/Join framework Process massive data sets with parallel streams and Map/Reduce implementation Control data-race conditions using concurrent data structures and synchronization mechanisms Test and monitor concurrent applications In Detail Concurrency programming allows several large tasks to be divided into smaller sub-tasks, which are further processed as individual tasks that run in parallel. All the sub-tasks are combined together once the required results are achieved; they are then merged to get the final output. The whole process is very complex. This process goes from the design of concurrent algorithms to the testing phase where concurrent applications need extra attention. Java includes a comprehensive API with a lot of ready-to-use components to implement powerful concurrency applications in an easy way, but with a high flexibility to adapt these components to your needs. The book starts with a full description of design principles of concurrent applications and how to parallelize a sequential algorithm. We'll show you how to use all the components of the Java Concurrency API from basics to the most advanced techniques to implement them in powerful concurrency applications in Java. You will be using real-world examples of complex algorithms related to machine learning, data mining, natural language processing, image processing in client / server en...
- Contents:
- Cover ; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: The First Step - Concurrency Design Principles ; Basic concurrency concepts; Concurrency versus parallelism; Synchronization; Immutable object; Atomic operations and variables; Shared memory versus message passing; Possible problems in concurrent applications; Data race; Deadlock; Livelock; Resource starvation; Priority inversion; A methodology to design concurrent algorithms; The starting point - a sequential version of the algorithm; Step 1 - analysis; Step 2 - design
- Step 3 - implementationStep 4 - testing; Step 5 - tuning; Conclusion; Java concurrency API; Basic concurrency classes; Synchronization mechanisms; Executors; The Fork/Join framework; Parallel streams; Concurrent data structures; Concurrency design patterns; Signaling; Rendezvous; Mutex; Multiplex; Barrier; Double-checked locking; Read-write lock; Thread pool; Thread local storage; The Java memory model; Tips and tricks to design concurrent algorithms; Identify the correct independent tasks; Implement concurrency at the highest possible level; Take scalability into account
- Use thread-safe APIsNever assume an execution order; Prefer local thread variables over static and shared when possible; Find the more easily parallelizable version of the algorithm; Using immutable objects when possible; Avoiding deadlocks by ordering the locks; Using atomic variables instead of synchronization; Holding locks for as short a time as possible; Taking precautions using lazy initialization; Avoiding the use of blocking operations inside a critical section; Summary; Chapter 2: Managing Lots of Threads - Executors ; An introduction to executors; Basic characteristics of executors
- Basic components of the executor frameworkFirst example - the k-nearest neighbors algorithm; K-nearest neighbors - serial version; K-nearest neighbors - a fine-grained concurrent version; K-nearest neighbors - a coarse-grained concurrent version; Comparing the solutions; The second example - concurrency in a client/server environment; Client/server - serial version; The DAO part; The command part; The server part; Client/server - parallel version; The server part; The command part; Extra components of the concurrent server; Comparing the two solutions; Other methods of interest; Summary
- Chapter 3: Getting the Maximum from Executors Advanced characteristics of executors; Cancellation of tasks; Scheduling the execution of tasks; Overriding the executor methods; Changing some initialization parameters; The first example - an advanced server application; The ServerExecutor class; The statistics object; The rejected task controller; The executor tasks; The executor; The command classes; The ConcurrentCommand class; Concrete commands; The server part; The ConcurrentServer class; The RequestTask class; The client part; The second example - executing periodic tasks
- The common parts
- Notes:
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed July 11, 2016).
- ISBN:
- 9781785885464
- 1785885464
- OCLC:
- 945637534
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.