java - API接收数据后如何处理才能快速结束连接?
PHP中文网
PHP中文网 2017-04-17 17:55:19
0
3
327

现在公司要求设计一个open API,来接收各个子系统上传上来的数据,现在纠结了,上传上来的数据是先存在临时表,然后用定时任务迁移到业务表,还是直接记录到业务表?本来想着先暂存到临时表,这样每次调用可以快速结束连接,但是在定时任务迁移到业务表时如果出现异常,就不能通知到子系统进行重发,请问各位是怎么设计的?

PHP中文网
PHP中文网

认证0级讲师

reply all(3)
迷茫

Queue, first in first out
The subsystem only reports data and inserts it into the queue
The business table subscribes to the information in the queue, and when information comes, it is stored in the business table

大家讲道理

Stored in the messaging system first, and then taken out to the business system by the business system. Directly enter the business system, if the volume will affect the business system to handle business

Ty80

ActiveMq, messaging middleware is a good choice

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template