- All handlers should be session based - Dispatcher should be the extension point of the server - Handlers should be implemented as middlewares - Middlewares are however an implementation detail of the Dispatcher implementation. Example: - The existing "system handlers" can be made into middlewares - The exisitng handler decorators transition well to middlewares. - The (for example) Phpactor implementation can be implemented as a middleware - replacing the "HandlerLoader" interface. Consequences: - Middlewares can be instantiated per _session_ with necessary dependencies: can stop passing special dependencies as method arguments.
Example:
Consequences: