Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document explains implementation/adoption of Sunbird DIAL context. Document details about 3 areas. First, how to extend the Sunbird Dial DIAL Context Vocabulary. Second, how dial DIAL context is being updated/handled in Sunbird Content service. Third, how to update the context of existing DIAL codes.

...

  1. Create ‘jsonld-schema’ folder in the private repository.

  2. Create a new folder under 'jsonld-schema' folder (Ex: jsonld-schema/adopter). 

  3. The Adopter folder should contain a 'context.json' file which is the adopter’s custom context file. 

  4. Specify the adopter folder name in 'jsonld.type' attribute in 'application.conf' file for application to refer to custom context. 

  5. One can also define 'contextValidation.json' (optional) in the adopter folder, similar to the one in the ‘sb’ folder. This file will be referred to perform data type validation of the incoming requests. If defined, context data input validation will happen when dial DIAL code update v2 API call is made with 'contextInfo'. 

  6. Custom ‘context.json’ should have a reference of the 'sb' vocabulary (schema.jsonld).

  7. Upload the private repository ‘jsonld-schema’ folder to blob storage.

  8. Update the ‘jsonld-schema’ folder path to the ‘jsonld.basePath’ property blob location.

How does the content service update

...

DIAL code context?

In order to ease the updation of DIAL context with content information wha dialcode when DIAL code is linked to a content/collection/collection unit, sunbird has updated ‘content-publish’ flink job to invoke the new dialcode-context-updater’ flink job via ‘post-publish-processor’ flink job. ‘dialcode-context-updater’ flink job uses ‘contextMapping.json’ file to prepare the input data as per the DIAL code context configured in the Sunbird DIAL Service. ‘dialcode_context_updater.context_map_path’ property mentioned in the ‘dialcode-context-updater.conf’ is used to specify the path of ‘contextMapping.json’. (Ref: https://raw.githubusercontent.com/project-sunbird/knowledge-platform-jobs/dialcode-context-updater/dialcode-context-updater/src/main/resources/contextMapping.json). At the moment, ‘contextMapping.json’ file packaged in Sunbird is in reference to the ‘sbed’ ‘context.json’ file.

How to update the content context to the already linked

...

DIAL codes (Data Migration)?

In order to update content context information to the already linked dial DIAL codes, there are 2 solutions:

  1. Re-publish the content/collections after deploying and configuring the ‘dial ‘DIAL service’, ‘content-publish’, ‘post-publish-processor’ and ‘dialcode-context-updater’ flink jobs.

  2. Push kafka events in below format to ‘dialcode-context-updater’ flink job input topic ({{env_name}}.dialcode.context.job.request).

...

$channel should be the channel of the dialcode DIAL code and content. 

$dialcode is the DIAL code to which content context is to be updated.

...