Hello,
From HTTP Server Middleware Meta Document:
The design pattern used by middleware has existed for many years as the pipeline pattern, or more specifically, "linear pipeline processing".
I'm trying to understand how does the pipeline pattern fits into proposed concept of middleware and I'm failing to see the connection.
The link to Wikipedia states:
In computing, a pipeline is a set of data processing elements connected in series, where the output of one element is the input of the next one.
But this is not what proposed middlewares are doing. If one middleware takes an request as input and output an response then the response can not be inputted into a next middleware, because of the type mismatch. Am I right?
The concept of
linear pipeline processing is even more fuzzy to me. According to the Wikipedia:
A linear pipeline processor is a series of processing stages and memory access.
To me it seems to be completely out of context of the proposed
middleware standard recommendation and doesn't provide any reference to the source literature.
Another page in
the Wikipedia about pipelines in software engineering seems to be more illuminating:
Narrowly speaking, a pipeline is linear and one-directional, though
sometimes the term is applied to more general flows. For example, a
primarily one-directional pipeline may have some communication in the
other direction, known as a return channel or backchannel, as in the lexer hack, or a pipeline may be fully bi-directional. Flows with one-directional tree and directed acyclic graph
topologies behave similarly to (linear) pipelines – the lack of cycles
makes them simple – and thus may be loosely referred to as "pipelines".
Although I still fail to see how middlewares can be arranged in pipeline (input - output type conflict I mentioned) and why they are linear.
To sum up - the statement at the beginning of the HTTP Server Middleware Meta Document is in my opinion more confusing than illuminating.
I propose to remove it or elaborate on it more, preferably with links to the source literature or at least to the second Wikipedia page that I mentioned.
Thank you for your comments in advance :) !