O'Reilly logo

Scala Design Patterns by Ivan Nikolov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 chain of responsibility is to:

Note

Decouple the sender of a request from its receiver by giving multiple objects the chance to handle ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required