Chapter 8. Structural patterns for actors
In this chapter
- Pipes and filters for sequential processing
- Scatter-gather for parallelizing tasks
- Recipient list: the scatter component
- Aggregator: the gather component
- Routing slip: dynamic pipes and filters
One of the immediate concerns with actor-based programming is how you model code that requires collaborators to work together when each unit of work is done in parallel. Collaboration implies some notion of process, and although there can be parallel processes, there will also be cases where it’s essential that certain steps happen after required prior steps have been completed. By implementing a few of the classic enterprise integration patterns (EIPs), we’ll show how Akka allows you to employ these design approaches while still making use of its inherent concurrency.
We’ll focus primarily on the most relevant EIPs to show different ways of connecting actors to solve problems. The architectural EIPs will get the most attention in this chapter, since we’re considering application structure.