ADR: Rationalizing File and File DMS services.
Rationalizing File and File DMS services.
Context & Scope
The Dataset service in its implementation of the DMS APIs (getStorageInstructions and getRetrievalInstructions) delegates the call to specific DMS's implementation of the
get*Instructons API. That lead to creation of new service called
File-DMS which supports the APIs that Dataset Service requires.
Note: The File-DMS does not have an approved ADR, and is not an approved by the community yet.
On the other hand, we already have a File Service that owns the responsibility for the management of files. Also, the design and APIs of the File service are approved by a thorough process of ADR.
So, instead of having two services who own the similar responsibility of managing files (File and File-DMS) we should rationalize both the services and move the APIs that Dataset Service requires to File Service itself. It would reduce the additional maintenance overhead of managing another service.
The decision is to merge File and File DMS services and consolidate all the File management APIs in File Service keeping inline with the File Service ADR that was approved File Service ADR.
Having multiple services with similar functionalities and responsibilities is an additional overhead w.r.t maintenance. Since there is already one approved service for supporting Files, the Additional APIs on Files required to support DMS Functionalities should be hosted by File Service.
The DMS APIs getStorageInstructions and getRetrievalInstructions for Files and File-Collections will be moved to File Service.
|Functionality||API to be Added in File Service||Existing API in File-DMS Service||Status||Capability|
|File Get-Storage Instructions||POST /files/storageInstructions||GET /file/getStorageInstructions||Moved from File-DMS Service to File Service||Generates the Signed URLs / temporary access tokens required to upload Files|
|File Get-Retrieval Instructions||POST /files/retrievalInstructions||POST /file/getRetrievalInstructions||Moved from File-DMS Service to File Service||Generates the Signed URLs / temporary access tokens required to download Files|
|File Collection Get-Storage Instructions||POST /file-collections/storageInstructions||GET /file-collection/getStorageInstructions||Moved from File-DMS Service to File Service||Generates the Signed URLs / temporary access tokens required to upload File Collections|
|File Collection Get-Retrieval Instructions||POST /file-collections/retrievalInstructions||POST /file-collection/getRetrievalInstructions||Moved from File-DMS Service to File Service||Generates the Signed URLs / temporary access tokens required to download File Collections|
Pros of merging File DMS APIs into File Service
- Existing File Service clients will not be impacted because the existing APIs will continue to stay.
- The Core-Logic of handling File uploads and downloads already exist in File Service and are well tested. So, the DMS APIs that are required for Dataset ADR will be able to directly hook into it reducing the development time.
- Features such as "Uploading to staging container" will be available out of the box. This reduces gaps between Dataset Architecture and existing File Service, which in-turn enables easier migration for clients.