英文:
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.
专注分享java语言的经验与见解,让所有开发者获益!
评论