I need to build a web application using Spring Boot for the RESTful API and Angular (4 or 5) which will remind the user at the right time. For e.g. if I have a meeting at 11 AM, my server component should know that there is this meeting at 11 AM real-time and then push the notification through WebSockets. I could not find any useful resources on the web which can help me understand and design this specific component which needs to listen for a database event every second.
Can anyone please help me out here in architecting this single component with the right choice of tools? Should this be a queue like Apache Kafka or Apache Storm, or something else entirely?
This is web application, so events will be delivered only if user is logged in, right? In that case it is likely that most events would not be delivered because there is no user.
I would deliver events using Websocket see Spring guide how to do that https://spring.io/guides/gs/messaging-stomp-websocket/
Simple solution would schedule all events using tool like http://www.quartz-scheduler.org/. Then if event fires and user is logged in then event notification will be send using websocket. But that may be wasteful if you have large number of users.
More lightweight solution would be
For me message queues doe not apply there. When you queue message for future event there is no sensible way for this message to be consumed when the event is about to occur.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With