ADR - Project & Workflow Services - Core Services Integration - Collaboration Service
This ADR focuses on collaboration service which is a key component for Project & Workflow Services.
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Context & Scope
The Collaboration Service is needed to be the source of truth of what collaborations exist in a partition and to hold specific configuration for that collaboration e.g. what applications can access it, what frame of reference do they want to use, what alerts do they need etc.
APIs
The service will act as a key value look up service for a given collaboration ID. It can list the the available collaborations e.g.
GET /api/collaborations-svc/v1/collaborations HTTP/1.1
[
"44771c69-89c1-4552-b038-9f596071c23e",
"69771c69-89c1-4678-b038-9f596071c44e"
]
Add in new collaborations and the configuration they hold
POST /api/collaborations-svc/v1/collaborations/69340rt6-89c1-4678-b038-9f596071c44e HTTP/1.1
{
"key1": { },
"key2": { },
}
retrieve the collaboration configuration information
GET /api/collaborations-svc/v1/collaborations/69340rt6-89c1-4678-b038-9f596071c44e HTTP/1.1
{
"key1": { },
"key2": { },
}
And update the collaboration configuration information
PATCH /api/collaborations-svc/v1/collaborations/69340rt6-89c1-4678-b038-9f596071c44e HTTP/1.1
{
"operation": "add"
"patch": "key3"
"value": "{ }"
}
Usage and Performance
One of the key use cases is for us to validate a given collaboration ID exists when provided on a request.
As per the design we want this to be done on behalf of the services in the OSDU® Data Platform at the infrastructure level using Istio or equivalent.
To not incur significant overhead the service mesh should cache the result for reuse on all subsequent requests.
We should make use of HTTP cache semantics to improve performance and resiliency on this point of failure.
cache-control: private, max-age=300, stale-while-revalidate=600, stale-if-error=600
vary: data-partition-id
For example if we apply the above response on the list collaborations API of this service
GET /api/collaborations-svc/v1/collaborations HTTP/1.1
The service meshes http client should cache the response on subsequent requests for 5 minutes. It should also use the cached response if there is an error retrieving an refreshed result from the service for 10 minutes.
This has the downside of not being able to use a newly added collaboration for up to 5 minutes in the OSDU® Data Platform. However collaborations should be rarely created and unlikely to be used straight away and so this should be acceptable.
Decision
Rationale
Consequences
We will have a new core service that needs to be implemented by every CSP.