Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume two instances, say, A and B, of the same service X are available in a clo

ID: 3890828 • Letter: A

Question

Assume two instances, say, A and B, of the same service X are available in a cloud application. Both A and B can perform exactly the same INSERT INTO statement when either of them is requested to insert a new student into a database table.

When a client, C, requests X, it is re-routed to B because its initial request of X has been time out on A, although A is not 'dead' but only responds slowly. When X is just completed by B and A becomes available to serve C's original request, what would occur? Is X an idempotent service? Explain your answer.

Explanation / Answer

Here PUT http method should have been used to access the X service and PUT is idempotent. So coming to our case the same operation (INSERT ) is getting repeated on the same student database ,so it won’t create separate resources on the server, even though A becomes available and c may utilize it, but at the end the result is just one resource at the server.Hence we can say X is idempotent.