Scalable Programming with Java 8 Parallel Streams
Attendees in this course will learn how to develop efficient parallel programs that run scalably on multi-core processors using powerful object-oriented and functional programming language features and frameworks defined by Java 8. In particular, this training focuses on how Java 8 leverages its functional programming features to create parallel streams, which are a powerful framework that provides a straightforward and scalable means to partition a stream of data elements into multiple substreams that can run in one or more processor cores and combine the output into a so-called "reduced" result.
This course assumes working knowledge of Java 8 Lambdas and Streams. We recommend taking the first course in this series if you require that training.
Programming with Java 8 Lambdas and Streams – Java 8 Concurrency Series, Part 1
Scalable Programming with the Java 8 Parallel Streams – Java 8 Concurrency Series, Part 2
Reactive Programming with the Java 8 Completable Futures – Java 8 Concurrency Series, Part 3
What you'll learn-and how you can apply it
- Develop efficient parallel programs using powerful Java 8 object-oriented and functional programming language features and frameworks.
- Recognize the inherent and accidental complexities involved with developing parallel software for Java 8 clients and servers.
- Understand how common software patterns and Java 8 parallel programming mechanisms can and cannot help to alleviate this complexity.
- Know where to find additional sources of information on how to successfully develop robust parallel programs in Java 8.
This training course is for you because...
- For software developers creating scalable apps on modern multi-core processors in Java.
This training is intended for software developers who are familiar with:
- General object-oriented design and programming concepts, such as encapsulation, abstraction, polymorphism, extensibility, and the Unified Modeling Language (UML),
- Core object-oriented programming language features, such as classes, inheritance, dynamic binding, and generics, that are available in Java,
- Core functional programming features, such as lambda expressions, method references, and functional interfaces, that are available in Java 8, and
- Core Java 8 sequential streams features, such as intermediate operations (e.g., map(), filter(), and flatMap()) and terminal operations (e.g., collect() and reduce())
- Core functional programming features and Java 8 sequential streams are covered in another Live Training course entitled Programming with Java 8 Lambdas and Streams
- Need to know how to download and install the Java 8 JDK and JRE
- Need to know how to download and install an IDE, such as IntelliJ, NetBeans, Eclipse, or Android Studio
Materials, downloads, or Supplemental Content needed in advance:
An installed copy of the Java 8 JDK and JRE
An installed copy of IntelliJ, NetBeans, Eclipse, or Android Studio
LiveLessons: Java Concurrency (2nd edition) (video)
About your instructor
Douglas C. Schmidt is a professor at Vanderbilt University, where he studies and teaches patterns, Java and Android concurrency, and middleware for distributed real-time and embedded systems. Doug has authored the video training course Design Patterns in Java LiveLessons (Addison-Wesley) and Java Concurrency (Addison-Wesley) and has coauthored several books, including Pattern Languages in Programming Design (Addison-Wesley), and several volumes of the Pattern-Oriented Software Architecture.
The timeframes are only estimates and may vary according to how the class is progressing
Segment 1 Overview of Java 8 Parallel Streams (20mins)
- Instructor will explain the key concepts and programming elements in Java 8 parallel streams, focusing on how it is often straightforward to convert a sequential stream to a parallel stream.
- Participants will understand the fundamentals of the Java 8 parallel streams framework.
Segment 2 How Java 8 Parallel Streams Work (40mins)
- Instructor will describe how Java 8 parallel streams work, focusing on how
- (1) parallel spliterator decompose tasks into subtasks
- (2) the Java fork-join framework computes subtasks in parallel using work-stealing queues
- (3) various collectors and/or reduction operations join the subtask results back together again.
- Participants will learn how the Java spliterator, fork-join, and collector frameworks provide the foundation for parallel processing of Java 8 parallel streams.
Break (5 minutes)
Segment 3 Applying Java 8 Parallel Streams to several case study apps (40mins)
- Instructor will show by example how to develop several “embarrassingly parallel” programs using Java 8 parallel streams. These programs will include detailed walkthroughs of the parallel versions of the SearchStreamGang and Folder apps, which are available at https://github.com/douglascraigschmidt/LiveLessons/tree/master/SearchStreamGang and https://github.com/douglascraigschmidt/LiveLessons/tree/master/Folders in open-source form, respectively.
- Participants will learn how to program with Java 8 parallel streams.
Segment 5 Pros and Cons of Java 8 Parallel Streams (15mins)
- Instructor will summarize the pros and cons of Java 8 parallel streams, focusing how to successfully apply the features provided by this framework in practice.
- Participants will learn when and how to apply Java 8 parallel streams, as well as know when not to apply Java 8 parallel streams.
Break (5 minutes)
Segment 6 Applying Java 8 Parallel Streams to ImageStreamGang App (60mins)
- Instructor will conduct a design and code walkthrough of the ImageStreamGang app, which shows how to create a parallel program that scalably downloads, processes, and displays images from remote servers.
- Participants will learn more advanced features of Java 8 parallel streams based on a walkthrough of the ImageStreamGang app, which is available as open-source from https://github.com/douglascraigschmidt/LiveLessons/tree/master/ImageStreamGang.
Note: this ends the metadata collection section of this guide.