-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta: Inter-Course-Phase communication concept #130
Comments
Suggested ImplementationThis document describes the current and proposed design for the interfaces between course phase modules. The goal is to establish a clear contract for data provided (outputs) and required (inputs) by each course phase, with the flexibility to resolve data either locally or remotely. 1. Current ImplementationCurrently the course phase type table contains, which data is exposed by a course phase and which data is required by a course phase type (only exception is the application phase, where the data export is controlled by the application questions). The format looks as follows: Provided Output MetadataDefinition:
Example:
Required Input MetadataDefinition:
Example:
Data Access: 2. Suggested AdditionsWe now want to adapt the current system, to allow for dynamic resolution and data storage outside the core, which still enables later phases to access the data. Therefore, we first need to adjust, how the meta data requirements are stored. A. Required Input Metadata
B. Provided Output Metadata EnhancementsFor the providedOutputMetaData, we now want to add the support for a course phase type, to define a resolution. The course phase type shall hence be able to specify, whether it has stored the exposed data inside the core (local) or at any other endpoint (remote).
New Format:
Resolution OptionsThe new resolution field shall support two different types of resolution.
-> Data is copied from either
2. Limitations
3. Suggested API SpecificationEndpoint Structure
Response Format
Retrieves the exposed data objects for all participants in a course phase. ExampleCourse Phase Type Specification (ProvidedOutputMetaData)
CoursePhase - RestrictedData (stores the current API Version)
Core Request for CoursePhase ParticipationsChanges
Provided Endpoint by the Course Module
Tasks of the SDKThe SDK has to perform the following tasks:
Open Issues / Questions
|
@Mtze let us discuss this approach and next steps tomorrow in out meeting. Additional Question:
|
After re-discussing, we propose a new schema design. Instead of the "required_input_meta_data" and "provided_output_meta_data" we rely fully of an API Spec. The Core shall be able to maintain different versions of the API Specs. A suggested API spec could look like: Required API Spec
Provided API Spec
Responsibility of Core
|
Final Design Proposal: Course Phase DTO Integration & Metadata Graph EnhancementAfter further discussion and review, we have refined our approach. This proposal introduces new database tables to better separate the concerns of course phase metadata and the DTO definitions. It also standardizes our endpoint conventions and clarifies the SDK integration strategy. 1. Database Schema Changes1.1 Course Phase TypeThe Schema:
1.2 Provided Output TableThis table defines which DTOs each course phase exposes. Each course phase type can declare multiple output DTOs, and each DTO definition adheres to OpenAPI conventions. Schema:
Example Data:
Endpoint Conventions for Provided DTOs
1.3 Required Input TableThis table specifies the input DTOs that a course phase requires. Inputs can be simple strings or complex objects, defined according to the OpenAPI schema. Schema:
1.4 Metadata GraphThe metadata graph represents an N:M relationship between course phases. Because a course phase type can now export multiple DTOs, the mapping schema is extended to capture DTO-specific relationships. Schema:
Note: 2. OpenAPI Specifications for DTOsEach DTO’s specification must adhere to OpenAPI standards. Below are examples of DTO schema definitions: Example: Score DTO{
"type": "object",
"properties": {
"score": {
"type": "number",
"description": "The score achieved in this phase."
}
},
"required": ["score"]
} Example: DeveloperProfile DTO{
"type": "object",
"properties": {
"appleID": {
"type": "string",
"description": "The EMail used for the appleID"
},
"gitLabUserName": {
"type": "string",
},
},
} 3. SDK Integration and Data Flow3.1 Data Flow OverviewThe following steps describe how data flows between the course phases and the core system, and how the SDK integrates with this process:
3.2 SDK Responsibilities
4. Next Steps / Implementation PlanTODO |
Exchanging data between phases is currently limited to data stored within the cores database (
course participation
-metadata
). This is fine for "small" data chunks related to students. In #126 we updated this model to distinguish between student accessable data and restricted data. For "simple" course phases (client only) phases this is sufficient. However, complex phases with their own microservice (maybe even their own access control mechanisms) this solution is not enough.We envision a way that course phase implementations can directly exchange data - without an intermediate store in the core.
The course phase configuration interface already allows to see "required" and "provided" data that needs to be provided by one of the previous phases and data that may be used by a following phase respectively.
With the extension that services may provide data in their own API we need an abstraction / SDK that:
Sub Problems
For this to work we need a few things
An API standard to specify (API Versioned)
Implementations
Future Expansion
The text was updated successfully, but these errors were encountered: