I need to design a mechanism in an existing app AppX (spring boot + react app) that supports displaying outage notifications on the top of the application.
The idea is that there will be AppY (again spring boot) that will add in the outage(can be of dependent applications)_ entries in DB with a status column, start time of the outage and end time. possible statuses are "ACTIVE","INACTIVE","COMPLETED". The application AppY needs to look into the start time, end time and update the status of the entry. I am confused as to how do I achieve this? Initial thought was to add an event type of mechanism like Kafka or a scheduler that runs frequently that will update the status but I am unable to figure out what's the best design to implement it.
AppX on the other hand will use this information from the DB and show the outages on the application. I am also not sure on how AppX is supposed to consume this information from DB - we thought why not get the data from DB through an API which will invoke once user clicks on something on the UI but this won't be real time and not that efficient as well. We need to maintain the outage historic entries which is why we have added the data in DB.
To conclude, AppY is supposed to do the updating, deletion, addition of the outage entries which will be displayed on the UI of AppX.