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 the chance to handle the request.
There could be some variations to the chain of responsibility design pattern. The original pattern is...