Pipeline

A pipeline is another example of a microservice connecting pattern. If you have made use of the shell on a *NIX system, then you have certainly piped the output of one command to another command. The programs on a *NIX system such as ls, sort, uniq, and grep are designed to perform just one task; their power comes from the ability to chain the tools together to build quite complex workflows. For instance, this command:

ls -1| cut -d \. -f 2 -s | sort |uniq

This command will list all the unique file extensions in the current directory. It does this by taking the list of files, then cutting them and taking the extension; this is then sorted and finally passed to uniq which removes duplicates. While I wouldn't suggest having a microservice ...

Get JavaScript: Functional Programming for JavaScript Developers 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.