[英]Store and forward design pattern with multiple instances of a microservice
I am designing a service that will be receiving requests which must only be executed exactly once (can be received more than once due to unique id presence). 我正在设计一个服务,它将接收只能执行一次的请求(由于唯一的id存在,可以多次接收)。
The flow is: 流程是:
outside world -> HTTP -> [A set of instance of Myservice] -> HTTP -> Vendor services 外部世界 - > HTTP - > [一组Myservice实例] - > HTTP - >供应商服务
So, I am receiving a bunch of requests over HTTP and I am looking to do some transformation, checking, store the request in a database and send to to the vendor services via HTTP too. 所以,我通过HTTP收到一堆请求,我希望进行一些转换,检查,将请求存储在数据库中,并通过HTTP发送给供应商服务。
My question is: 我的问题是:
What is an effective way to achieve a store and forward pattern in my service ie receive the request and store it immediately, therefore acking it to the "outside world" immediately and then in my own time forward it to the destination service, retrying as many times as needed? 什么是在我的服务中实现存储和转发模式的有效方式,即接收请求并立即存储它,因此立即将其应用到“外部世界”,然后在我自己的时间将其转发到目标服务,重试尽可能多的根据需要的时间?
Problems: 问题:
I would advise against NIH syndrom and take a dependency on a mature technology that delivers all your reliability requirements out of the box. 我建议不要使用NIH综合症,并依赖于成熟的技术,这些技术可以满足您的所有可靠性要求。
Cadence Workflow is capable of supporting your use case with minimal effort. Cadence Workflow能够以最小的努力支持您的用例。
Cadence offers a lot of features that are hard to match building custom task orchestration solution: Cadence提供了许多难以匹配构建自定义任务编排解决方案的功能:
See the presentation that goes over Cadence programming model. 请参阅Cadence编程模型的演示文稿 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.