Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Since the question sets are an integral part of the interactive video, it is required that all the question sets are published before the content is published. This document talks about various approaches for achieving this publishing, and also changes to the ECAR generation to enable offline consumption of interactive videos.

This feature reuses the Question Sets, and these question sets are prompted to learners at the pre-decided interception points. So, it is necessary that the question sets used in a given video are published before the video can be published. Below are 2 approaches to achieve this

Option 1 - Single publish for question sets & video

In this option, the publishing of question sets will be deferred. The question sets and video content will be published in a single publish API call.

However, the suppression will need to happen based on a condition, and not a blanket change for all question sets.

  1. visibility flag - question sets marked as visibility=Parent will not be published

  2. category - question sets from selected categories will not be published

The publish job for the interactive video will need to be enhanced to first publish the question sets and then publish the video

Handling Publishing Failure

In this case, even if any one question set or the video itself fails to publish, the content will not publish (i.e. move to Failed state) and the error should be available in the content.

Other Remarks

  1. The mobile team has seen challenges with manifest JSON beyond 2MB. So the combined manifest for the content + question sets will need to be lesser than 2MB. One way to achieve this is to put a limit on the number of questions that can be added to an interactive content.

Option 2 - Chained publishing

In this approach, the publishing of question sets will still be deferred. However instead of a single publish call for question sets and content, the publishing will happen sequentially using chaining of publish events pushed to the publish topic.

The publishing of the first question set will happen first, followed by the subsequent question set, and finally the content.

When the publish API for question sets is called, all the question sets and the video is moved to Processing state. This way, in case of a failure, videos stuck in Processing state can be looked up, and the failure analysed.

The publish event structure will be enhanced to add the details of the chain i.e. the sequence and the IDs of the content. As the chain progresses, each publish event will have the current state of the chain i.e. which are the preceding successful publishes, and which are the ones up next. Proposed changes to the publish event are below

{
  "eid": "BE_JOB_REQUEST",
  "ets": 1634812181709,
  "mid": "LP.1634812181709.88b311c2-a733-4846-b2a2-31d9dceda436",
  "actor": {
    "id": "Publish Samza Job",
    "type": "System"
  },
  "context": {
    "pdata": {
      "ver": "1.0",
      "id": "org.sunbird.platform"
    },
    "channel": "0133866213417451520",
    "env": "dev"
  },
  "object": {
    "ver": "1634810156009",
    "id": "do_213392364484722688135"
  },
  "edata": {
    "publish_type": "public",
    "metadata": {},
    "publishchain": [
      {
        "identifier": "do identifier of questionset 1",
        "mimeType": "application/vnd.sunbird.questionset",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "QuestionSet",
        "state": "Processing",
        "publishErr": "",
        "order": 1
      },
      {
        "identifier": "do identifier of questionset 2",
        "mimeType": "application/vnd.sunbird.questionset",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "QuestionSet",
        "state": "Processing",
        "publishErr": "",
        "order": 2
      },
      {
        "identifier": "do_213392364484722688135",
        "mimeType": "video/mp4",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "Content",
        "state": "Processing",
        "publishErr": "",
        "order": 3
      }
    ],
    "action": "publishchain",
    "iteration": 1,
    "contentType": "Resource"
  }
}

As the publish progresses, the publishchain gets updated as below

    "publishchain": [
      {
        "identifier": "do identifier of questionset 1",
        "mimeType": "application/vnd.sunbird.questionset",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "QuestionSet",
        "state": "Live",
        "publishErr": "",
        "order": 1
      },
      {
        "identifier": "do identifier of questionset 2",
        "mimeType": "application/vnd.sunbird.questionset",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "QuestionSet",
        "state": "Live",
        "publishErr": "",
        "order": 2
      },
      {
        "identifier": "do id of video",
        "mimeType": "video/mp4",
        "lastPublishedBy": "2ca3f787-379f-42d4-9cc3-6bc03a2d4cca",
        "pkgVersion": null,
        "objectType": "Content",
        "state": "Processing",
        "publishErr": "",
        "order": 3
      }
    ]

There is no change to the ECAR generation, each publish event will work as today, to generate an ECAR for each question set and the content.

Handling Publishing Failure

There is no change, since if a question set or content fails to publish the publish error is already updated in the content. However, the UI side would need to be enhanced to give visibility of the failure to the creator.

The UI can provide a way to view a list of content in Processing state. The UI will also allow to view the publishing state of each of the Question Sets contained within the content, this will allow troubleshooting in case the Content is stuck in Processing state due to one of the Question Sets failing to publish.

EDIT on 25/11 - Removed the sections related to impact on app, player & ECAR. Since there is a separate design doc discussing the ECAR structure and the player changes here - ECAR Structure for Interactive Videos

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.