You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an execution Strategy pattern (SequentialStrategy, ParallelTaskStrategy, DedicatedThreadStrategy) so how a batch is processed can change without touching business code.
Goal
Let processing mode be swapped at runtime (e.g. sequential for debugging, parallel for prod) via a pluggable strategy contract.
Problem
Execution mode is hard-coded in each call. Changing between sequential (debuggable) and parallel requires rewriting call sites.
Scope
IExecutionStrategy contract.
SequentialStrategy: run tasks in order.
ParallelTaskStrategy: standard Task.WhenAll.
DedicatedThreadStrategy: for CPU-heavy work (explicit scheduling).
Strategy selected via ExecutionOptions or registration.
Unit tests: switching strategy changes none of the application code.
Design Expectations
Thin; resilient; the strategy orchestrates the base primitives.
Business delegates stay identical regardless of strategy.
Activity