I am develop a mobile app. This app have a test. The user take the test and when finish it, the app send the wrong answers to the server. The server save the answers in a database and get the content of the notification using the wrong answer as an id. The system set the notifications and send it to the device using a token. The server is sending the notification all the time until the user take the test another time and then, the system stop all the notifications and update the information using the new wrong answers. The issue is that the app will be used by more than a single user, I mean, we hope the app were used by hundred of users.
If the user A take the test, the system will be work fine, it will be send the notifications to the user A, but if the user A take the test and recieve its notifications and a user B also take the test, the server will replace the notifications of the user A with the new information of the user B.
I hope to be clear.
Can anyone help me?
The logic must be in the server or in the client or I must use any specific architecture for manage this notifications.
Thanks a lot