Background: Following is some material on advanced design patterns in RESTful API and microservice architecture:
- Idempotency key: sometimes we want to ensure certain actions are performed at most once. The idempotency key pattern implement this by having the client supply a client-generated key and add it as part of their request. Server side should ensure that subsequent repeated requests with the same idempotency key is ignored or that its effect is idempotent - that doing the action twice or more is the same as doing it just once.
- Other metadata: a RESTful API endpoint could allow the client to add its own metadata object in the request, with arbitrary json data allowed as long as its top level is an object.
- Controller resource: A common question in REST is how can complex transaction be modelled if REST is mostly like plain CRUD on data. One pattern to solve for this is to explicitly model such a transaction/operation as an abstract object itself, with lifecycle controlled/triggered by doing RESTful operation on this resources.
- Distributed Saga and Compensating transaction: on the backend, a business transaction may correspond to multiple DB transaction, and potentially involve external/3rd party API calls. These are all actions that fundamentally cannot be made ACID. These pattern solve this problem by using an alternative model where each step is made idempotent, with explicit procedure to compensate for the effect through a separate action in the event the whole business transaction is considered to have failed and need to be "rollbacked" (note the quote because it is not rollback in the conventional sense).

Suggest possible advanced scenario where these patterns may be used to provide a good solution. Provide two versions of response separated with exactly 6 asterisk symbols: ******.
user