Let's say we have a web application where the users can login and have a status (available, not available). There is server application that has to know the users status. This can be synchronised by sending a message from the webapp when the user status changes.
The question is how to get efficiently all the users (a lot of users) status when the server application starts up?
Options I can think of:
- The server app asks for a list of user, status from the webapp (I don't think this is efficient)
- The server app reads the user, status from the database directly (what if the server app slows down the database because of this huge user list?)
Is there a better way doing this?