Another scenario proposed by Rodolfo (ralonsoh), is to do placement call for update allocations (PUT /allocations/{consumer_uuid} ) before the db transaction begins for port update (BEFORE_UPDATE callback for Port).
Pros:
* no change in current Port update API (synchronous behaviour, when the API returns the user can expect that all operations arefinished)
* the possibly time consuming REST call for placement is outside (before) db transaction.
* as nothing is written to the DB in case of failure there is no need for rollback.
Cons:
* in case there is a need to update allocations in placement the user can experience extra time cost for port update (this is anyway true)
Another scenario proposed by Rodolfo (ralonsoh), is to do placement call for update allocations (PUT /allocations/ {consumer_ uuid} ) before the db transaction begins for port update (BEFORE_UPDATE callback for Port).
Pros:
* no change in current Port update API (synchronous behaviour, when the API returns the user can expect that all operations arefinished)
* the possibly time consuming REST call for placement is outside (before) db transaction.
* as nothing is written to the DB in case of failure there is no need for rollback.
Cons:
* in case there is a need to update allocations in placement the user can experience extra time cost for port update (this is anyway true)