当前位置:网站首页>Workflow番外篇
Workflow番外篇
2022-07-31 04:55:00 【話吥哆先森丶】
举个栗子
一个用户注册了一个试用期的订阅,超过试用期未取消则需要收费,最多收X个月,且需要发送邮件告诉用户收费标准及随时取消订阅。
分析
业务不难,但必须确保业务流程具有容错性和可伸缩性
解决办法
1、定期轮询数据库,执行必要操作,更新状态
- 下游系统不可用时,变更状态频繁
- 产品收费失败
- 邮件失败
- 失败后重试时间过长
- 需要有逻辑来处理损坏的客户记录,以避免阻塞整个流程
- 数据库有性能和可伸缩性限制(最终需要分片),对于需要不断轮询的场景来说效率不高
2、排队系统(计时器+队列)有更新,则推送到队列中
- 计时器和队列见无事务,模型复杂
3、Temporal
- Temporal封装了整个业务逻辑,无第三方系统即可保证持久性及容错性
边栏推荐
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
- MySQL forgot password
- Unity Framework Design Series: How Unity Designs Network Frameworks
- Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined
- SQL row-column conversion
- 开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
- 三道leetcode上的oj题
- STM32 - DMA
- The Vue project connects to the MySQL database through node and implements addition, deletion, modification and query operations
- [py script] batch binarization processing images
猜你喜欢

Doris学习笔记之监控

MySQL database must add, delete, search and modify operations (CRUD)

npm、nrm两种方式查看源和切换镜像

Interview | Cheng Li, CTO of Alibaba: Cloud + open source together form a credible foundation for the digital world

Unity打灵狐者

打造基于ILRuntime热更新的组件化开发

Mysql application cannot find my.ini file after installation

开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开

Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions

Mysql应用安装后找不到my.ini文件
随机推荐
[Detailed explanation of ORACLE Explain]
30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully
聚变云原生,赋能新里程 | 2022开放原子全球开源峰会云原生分论坛圆满召开
高斯分布及其极大似然估计
MySQL开窗函数
ERP生产作业控制 金蝶
Unity Fighter
PWN ROP
Open Source Database Innovation in the Digital Economy Era | 2022 Open Atom Global Open Source Summit Database Sub-Forum Successfully Held
PWN ROP
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
STM32 - DMA
MySQL fuzzy query can use INSTR instead of LIKE
.NET-9. A mess of theoretical notes (concepts, ideas)
centos7安装mysql5.7
The 15th day of the special assault version of the sword offer
Minio上传文件ssl证书不受信任
数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
Three oj questions on leetcode
Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined