知识卡片
中间件处理请求公共逻辑
中间件位于入站请求和目标操作之间,可以统一处理租户上下文和相关策略。它适合框架已提供可组合处理链的场景,使服务代码专注业务;选择机制时应结合语言框架和实际请求生命周期,不把一种云上的方案硬套到所有服务。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Building Multi-Tenant Services · 查看原书依据
Some development frameworks support the notion of middleware. The idea is that you can introduce code that sits between your inbound request and your target operation. This allows you to intercept and apply any global policies that would be applied across your service.
参考来源
- 位置:《Building Multi-Tenant SaaS Architectures》第07章《Building Multi-Tenant Services》(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Multi-Tenant SaaS Architectures/_epub-src/OEBPS/ch07.html)
- 结论依据:原文具体说明中间件位于入站请求和目标操作之间,可以统一处理租户上下文和相关策略;本卡据此归纳机制及适用边界。
- 原始内容:Some development frameworks support the notion of middleware. The idea is that you can introduce code that sits between your inbound request and your target operation. This allows you to intercept and apply any global policies that would be applied across your service.