通过 API 打开/关闭弹簧定时器并得到通知

huangapple 未分类评论50阅读模式
英文:

Turn on/off spring timer via api and be notified of it

问题

我的应用程序包含许多任务,这些任务依赖于调度器,如通过电子邮件发送报告、在数据库之间传输数据、将数据发送到其他API等。但并不总是需要同时执行所有任务。

我的应用程序由一个前端REST客户端访问,我希望能够启动和关闭这些定时器,并通知客户端有关更改的信息。

我考虑使用WebSocket来进行通知,但我不知道如何创建一种可扩展的方式来处理这些定时器。

英文:

My application contains many task that depends on schedulers as send reports via email, transfer data between databases, send data to another apis. But it's not always that all task have to be executed in same time.

My application is accessed by a front end rest client and I'd like to be able to turn on and turn off that timers and notify the clients about the changes.

I was thinking to use websocket to do the notification, but I've no idea how to create a scalable way to handle the timers.

huangapple
  • 本文由 发表于 2020年5月29日 13:49:48
  • 转载请务必保留本文链接:https://java.coder-hub.com/62079494.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定