This is the second blog where we are discussing basic architectural styles in software architecture. The link to the previous article can be found here.
This time we are going to discuss “Pipeline architecture style”. Whenever there is a need to split the functionality into smaller parts, this particular pattern is followed. Typically this is a linear and one-directional implementation.
A prime example of this pattern is Unix shell scripts, such as Bash.
This architecture is also known as Pipe-Filter Architecture.
Topology
Pipes
Pipe represents a communication channel between filters. Again, each pipe is typically unidirectional.
Filters
Filters are self-contained and independent from other filters. These are designed to be stateless and expected to perform only one task.
There are four types of filters
Producer
This is a starting point for each process also called a source
Transformer
Accepts input and typically performs a transformation on the data.
Tester
Accepts input, tests one or more criteria, could also produce output.
Consumer
This is the terminating place for the process(es). The consumer may persist the final data in the database or choose to display it on the screen.
Why use this?
This is one of the simplest implementations wherein data needs to be processed at different layers before persisted or displayed to the end-user.
Advantages
- Simple to implement
- Simple and easy to understand
- Relatively low cost to build and maintain
Disadvantages
- Difficult to scale
- Does not offer elasticity
- Lack of fault tolerance, if one steps fail due to hardware issues, the entire application is impacted
Stay tuned to this blog series as we will be discussing how to apply the most common software architecture patterns. The next post of this series will discuss another interesting Architecture pattern.
If you have any queries/concerns, then you can drop me a message on LinkedIn.
Thanks for reading!