Given are the following examples of communication. Decide for each one whether it is asynchronous, synchronous (real-world), synchronous (delivery-based), or synchronous (response-based)
Model the following scenario of a database system using a UML sequence diagrams.
Users can store and query any data in the database system. However, users cannot access the database directly but need to interact with an authentication service and a request service.
In order to access the database, a user first needs to log in to the authentication service, providing their user name and password. The authentication service checks both and informs the user whether the given inputs are accepted or not. If not, the user has two more tries to login. After the third incorrect attempt, their account is blocked.
If the login succeeded, the authentication service informs the request service that the login was successful and queries from the user may be accepted. Now, the user can interact with the request service. They can send as many requests as they want. Each of them is passed by the request service on to the database backend. After the database has handled the request, it sends the requested data back to the request service, which forwards it to the user.
Once the user has finished their work, they send a logout request to the authentication service, which in turn informs the request service that there will be no more requests by this user. The logout messages will be confirmed.