F1 (Java) Story 07: Implement requesting PWS schemas definitions from the OSDU Schema service
Story 7: Implement Requesting P&WS Schema Definitions from the OSDU Schema Service and Cache Them for Use
Description
Given that the schemas necessary for "Project and Workflow Services" (P&WS) are not currently bootstrapped with the OSDU instance deployment, they are not available by default on the Schema service. These schemas include:
- master-data--CollaborationProject:1.0.0: link
- reference-data--CollaborationProjectLifecycleStatus:1.0.0: link
- AbstractCollaborationLifecycleEvent:1.0.0: link
For the task:
- ingest these schemas into the Schema service manually as "custom" schemas as a prerequisite.
- Then, implement functionality in the P&WS to request these schema definitions from the OSDU Schema Service, get the response, and cache it for future use. Acceptance Criteria
- Ensure that the implementation handles errors and exceptions where the Schema Service might be unavailable or the schemas do not exist.
- Successful manual ingestion of the required P&WS schema definitions to the OSDU Schema Service as "custom" schemas.
- Successfully execute GET requests to the OSDU Schema Service to retrieve the manually ingested schema definitions.
- Proper parsing of the received schemas and storing them in a cache for efficient future access.
- Implement effective error handling measures and clear error messages for scenarios where the Schema Service is unavailable or the schemas don't exist.
- Thorough testing of all implemented functionality to ensure reliable, effective operations.
Testing Scenarios
- Validate the successful manual ingestion of necessary schemas into the Schema service.
- Verify the successful retrieval and caching of the ingested schema definitions from the Schema Service.
- Test P&WS’s data validation and interactions using the cached schemas.
- Evaluate system behavior and the precision of error messages when the Schema Service is unavailable or the schemas do not exist.
- Test the robustness and scalability of the implementation by performing multiple and concurrent requests.
Technical Notes
- Implement a Circuit Breaker design pattern to prevent system failure when the Schema Service is unavailable.
- Handle potential null responses cautiously to prevent Null Pointer Exceptions.
- Validate the effectiveness and efficiency of the caching mechanism.
- Keep in mind that the location and availability of these schemas could change when they are merged into the main branch and bootstrapped with the OSDU instance deployment. The system should be designed flexibly to accommodate these changes.
- When designing the implementation, utilize the "os-core-common" and "os-core-lib-aws" libraries as other OSDU core services do, to reduce boilerplate code.
Edited by Dmitrii Novikov (EPAM)