Building Domain-Specific “Russian-Doll” Pipelines in .NET 9 – a Functional Approach with ProblemOr
Move the elegance of ASP.NET Core middleware into any complex back-end workflow – without
HttpContext
, without OOP builders, and without losing DI, cancellation or early-exit behaviour.
Why a pipeline?
Business workflows such as Get GPS Logs often involve many steps:
- Classify the request (Site vs Council, Commercial vs Domestic).
- Fetch way-points from a repository.
- Convert timestamps to local time.
- Constrain results to a bounding-box.
- Materialise the response.
Each step should be independent, replaceable, testable and able to short-circuit on error or empty data – the classic “Russian-doll” pattern that ASP.NET Core middleware delivers for web traffic.