search menu icon-carat-right cmu-wordmark

Sink or Swim: Enhancing Pipe-and-Filter Diagrams

May 2014 Presentation
Ivan Gevirtz (Google)

Presentation at SATURN 2014. Presenters discuss "Sink or Swim," a specialization of the pipe-and-filter architectural style.


Software Engineering Institute



Sink or Swim is a specialization of the pipe-and-filter architectural style. It enables developers to reason about hard problems in distributed systems and data processing by focusing attention on the push or pull nature of the filter coupling. This is accomplished by creating two connector subtypes (push and pull) and elaborating the filters with synchronous (active) or asynchronous (passive) ports. It is then possible to name and characterize eight subtypes of filters, one for each combination of {sync/async, input/output, middle/terminal}. This lighthearted talk covers how the style was invented, how it works, how it helps developers reason about hard problems, and how it was successfully applied to yield orders-of-magnitude performance improvements to existing systems. This style has several advantages over the regular pipe-and-filter style: 

  • The style makes problems easy to spot through a graphical notation that enables and encourages visual reasoning. 
  • The style makes anti-patterns visible by highlighting resource implications of given usage patterns.
  • A small catalog of rewrite rules guides developers to refactor designs at the style level to avoid performance (and other) problems.