For now all Middleware run in sequence
Client => Middleware1 => Middleware2 => Middleware3 => Server (Controller)
What's Middleware Pipeline is to create a pipeline that will make Middleware run in parallel , WHAT ?
| => (Pipeline) [Middleware1 => Middleware2]
Client =>
| => (Pipeline) [Middleware3]
Why Pipelines ?
80% of the middleware are not dependent upon each other, so executing them in sequence is overkill
Making them parallel will be huge performance boost.
What I have in mind is.. Piplelines + Middleware
Each pipeline will be executed in sequence and it can have multiple middleware, they will be executed in parallel
So If u want 2 middleware to be executed in sequence, you can put them in 2 pipelines
So middleware like聽Shield + Flash + AuthInitwill be in a single pipeline
And聽Cors聽will be in a different pipeline, since it has the ability to end the request of it鈥檚 own.
@thetutlage "the Author of AdonisJS"
You can read more at this Discussion in AdonisJS Framework
馃憤
@adrien2p Please use reactions instead, these comments really pollutes issues so is this one I'm writing.
Express is written asynchronously to handle middlewares as a pipeline, and this is just a more literal expression of how Express handles middlewares.
I will try to see it anyway
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.