question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Suggestion] Adding Middleware Pipeline

See original GitHub issue

What is a Middleware Pipeline ?

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’s own. @thetutlage “the Author of AdonisJS”

You can read more at this Discussion in AdonisJS Framework

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wbhobcommented, Nov 7, 2017

Express is written asynchronously to handle middlewares as a pipeline, and this is just a more literal expression of how Express handles middlewares.

1reaction
MonsieurMancommented, Nov 7, 2017

@adrien2p Please use reactions instead, these comments really pollutes issues so is this one I’m writing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building a middleware pipeline with WebApplication
In this post I look at some of the code behind WebApplication, and focus on how the middleware and endpoints are configured.
Read more >
Middleware in ASP.NET 6 - Conditionally Adding ...
We're going to say, in this post, that we only want to add the TimeLoggingMiddleware to the application pipeline under certain conditions. Those ......
Read more >
Tutorial On How To Implement Middleware Pipeline In VueJS
This tutorial will discuss the steps to implement middleware pipeline in VueJS and further learn how you can use multiple middlewares on ...
Read more >
ASP.NET Core Middleware - Creating Flexible Application ...
ASP.NET Core Middleware is software integrated inside the application's pipeline that we can use to handle requests and responses.
Read more >
Middleware - Bot Service
The bot middleware pipeline ... For each activity, the adapter calls middleware in the order in which you added it. The adapter passes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found