当前位置:网站首页>Workflow番外篇
Workflow番外篇
2022-07-31 04:55:00 【話吥哆先森丶】
举个栗子
一个用户注册了一个试用期的订阅,超过试用期未取消则需要收费,最多收X个月,且需要发送邮件告诉用户收费标准及随时取消订阅。
分析
业务不难,但必须确保业务流程具有容错性和可伸缩性
解决办法
1、定期轮询数据库,执行必要操作,更新状态
- 下游系统不可用时,变更状态频繁
- 产品收费失败
- 邮件失败
- 失败后重试时间过长
- 需要有逻辑来处理损坏的客户记录,以避免阻塞整个流程
- 数据库有性能和可伸缩性限制(最终需要分片),对于需要不断轮询的场景来说效率不高
2、排队系统(计时器+队列)有更新,则推送到队列中
- 计时器和队列见无事务,模型复杂
3、Temporal
- Temporal封装了整个业务逻辑,无第三方系统即可保证持久性及容错性
边栏推荐
- 重磅 | 基金会为白金、黄金、白银捐赠人授牌
- Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
- MySQL forgot password
- Three oj questions on leetcode
- CentOS7 install MySQL graphic detailed tutorial
- SQL语句中对时间字段进行区间查询
- Minesweeper game (written in c language)
- MySQL optimization: from ten seconds to three hundred milliseconds
- Unity Fighter
- Open Source Database Innovation in the Digital Economy Era | 2022 Open Atom Global Open Source Summit Database Sub-Forum Successfully Held
猜你喜欢

110道 MySQL面试题及答案 (持续更新)

行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开

PWN ROP

Open Source Smart Future | 2022 OpenAtom Global Open Source Summit OpenAtom openEuler sub-forum was successfully held

Unity URP渲染管线摄像机核心机制剖析

Unity手机游戏性能优化系列:针对CPU端的性能调优

专访 | 阿里巴巴首席技术官程立:云+开源共同形成数字世界的可信基础
![[C language] Detailed explanation of operators](/img/fa/dce3da39f19b51c6d1b682128da36b.png)
[C language] Detailed explanation of operators

Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析

Doris学习笔记之监控
随机推荐
On-line monitoring system for urban waterlogging and water accumulation in bridges and tunnels
MySQL database must add, delete, search and modify operations (CRUD)
Create componentized development based on ILRuntime hot update
npm、nrm两种方式查看源和切换镜像
Blockbuster | foundation for platinum, gold, silver gave nameboards donors
Open Source Smart Future | 2022 OpenAtom Global Open Source Summit OpenAtom openEuler sub-forum was successfully held
unity2d小游戏
MySQL fuzzy query can use INSTR instead of LIKE
MySQL transaction (transaction) (this is enough..)
【py脚本】批量二值化处理图像
打造基于ILRuntime热更新的组件化开发
三道leetcode上的oj题
DVWA shooting range environment construction
Explanation of
mysql uses on duplicate key update to update data in batches
HCIP Day 10_BGP Route Summary Experiment
MySQL database installation (detailed)
ABC D - Distinct Trio (Number of k-tuples
DVWA靶场环境搭建
MySQL optimization: from ten seconds to three hundred milliseconds