The chain of responsibility design pattern

Nowadays, with the growth of data sizes and the hype around big data, stream processing is something that many applications will have to be able to do. Stream processing is characterized by an endless stream of data, which is passed from one object to another while each of them could be doing some processing and then passing it on to the next one. In other cases, data could be moved on in the chain until it arrives at an object which knows how to process a certain command.

The preceding behavior is really suitable for the chain of responsibility design pattern.

The purpose of the chain of responsibility design pattern is to decouple the sender of a request from its receiver by giving multiple objects ...

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.