Locking the request at resource level

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-11

While processing multiple concurrent createOrUpdateResourceData requests, the Analyzer detail view REST API applies locking at the resource level.

The following diagram shows when three requests are processed concurrently and each request contains a different resource to create or update.



At time t1, the API server receives request R1 and starts creating the resource or updating its scalar data. At the same time, the API server receives requests R2 and R3, and while R1 is in progress, requests R2 and R3 are locked.

At time t2, when the resource creation and scalar update of request R1 is complete, the API server starts the time series update. At the same time the API server request R2 and starts creating the resource or updating the scalar data, request R3 is locked.

At time t3, when the resource creation and scalar update of request R2 is complete, the API server processes request R3 in parallel with the time series update of requests R1 and R2.

The following diagram shows when two requests are being processed concurrently and both requests contain the same resource to create or update.



For this scenario, where both requests contain the same resource to create and update, the API server applies the lock as it did in the previous scenario.

At time t1, the API server receives request R1 and starts creating the resource or updating its scalar data. At the same time, request R2 is received. However, request R2 is locked while request R1 is in progress.

At time t2, when the resource creation and scalar update of request R1 is complete, the API server starts the time series update. At the same time, series of request R1, the API server starts request R2. As the resource is already created by request R1, request R2 only updates the scalar and time series data.

The following diagram shows when two requests are being processed concurrently. The first request contains a resource to create or update, while the second request attempts to retrieve the resource data for the same resource.



At time t1, the API server receives request W1 to create or update a resource data and it begins processing.

At time t2, the API server receives request R1 to retrieve the same resource, which is being created in another request. Request R1 is processed in parallel with request W1 and the API server attempts to retrieve the resource. In this case, partial results might be returned.