title: Most elegant way to implement Pipe and Filter Pattern
body: <p>I want to create a Pipe and Filter based data handler that should manipulate incoming data sets like so, but not neccessarily limited to:</p>
  
  <p>source pipe(could be a data set from a db) &lt;-sink-source-> filter(add an additional field) &lt;-sink-source-> filter(manipulate some more data / remove ie nullify data set)</p>
  
  <p>I have an idea how such architecture will look like in C/C++. But given all the goodies that come with C++11's functional aspects, I hope this task can be done in an elegant way so that it is able to:</p>
  
  <ul>
  <li>easily scale and use it in a multithreaded environment (e.g. by performing filter tasks as lambda funcions, thus probably avoiding at least some thread handling)</li>
  <li>easily add and remove filters at runtime</li>
  <li>handle input streams lazily</li>
  </ul>