Skip to content

Latest commit

 

History

History
119 lines (74 loc) · 5.83 KB

File metadata and controls

119 lines (74 loc) · 5.83 KB

inQuiry Service

Sunbird inQuiry Service is the backend service used from inQuiry Editor and Player. This service is also called as Question & QuestionSet service.

Question & Question Set Service

Question and Question set service is a micro-service which provides APIs to manage the lifecycle and workflows of creation and consumption of question & question set objects.

More details on the player can be found here and here.

Question & Question Set Service architecture is as below,

{% embed url="https://youtu.be/mjV0MmP9WuQ?si=n61pgaVwp9G55QI4&t=2407" %}

Player / Editor interaction with inQuiry Service

Publish Process

Publish Process

{% embed url="https://youtu.be/mjV0MmP9WuQ?si=IUEzBizPUScSA58R&t=2448" %}

Critical APIs - Sequence of calls

Below is a high level picture of how the sequence of flow happens for some of the critical apis. The flow is similar to other API end points in inQuiry.

This also shows the usage of Knowlg core in the flow of inQuiry apis.

QuestionSet Create

QuestionSet Read

QuestionSet Update

Question Create

{% hint style="info" %} The detail on how the data is saved and retrieved is not depicted in above sequence of flow as it is part of Knowlg core library. {% endhint %}

{% embed url="https://youtu.be/mjV0MmP9WuQ?si=Bb45DfVfW6ffIC63&t=2489" %}

Data Models

  • Schemas
  • Databases
    • Neo4J (Primary Data Storage. inQuiry store all objects (e.g: Question/QuestionSet/ObjectCategory, etc) simple/lite metadata (e.g: name, description, createdOn, etc) in graph)
    • Cassandra (Secondary data Storage. inQuiry stores all complex/bulk data in this storage. For more information, please refer to external section of each object config (config.json) to see what all data gets stored in secondary storage for particular object.)
    • Elastic Search (Data Stored in Grpah Database (Primary Data Storage) gets replicated in Elasticsearch through data pipeline. So that user can search data based on different criteria (e.g: need to search science subject questions for class 5))
    • Redis (Used for caching the question / questionSet information. It only stores object which are ready for consumption (objects in Live status))
    • Cloud Storage (Used to store assets like media, question/questionset bundles, artifacts in the cloud storage)

Code Structure

  • Repository

  • Important Folder / Package structure

    - assessment-api [API service containing question and question set service]
     - assessment-actors
       - src/main/scala/org/sunbird /actors [Contains the actor module which talk to manager module as well as graph engine]
       - src/main/scala/org/sunbird/managers [Contains additional utility which is needed for processing]
     - assessment-service
       - app/controllers [The REST API controllers]
     - qs-hierarchy-manager
       - src/main/scala/org/sunbird/managers [all utility to perform operations on hierarchal structure]
    

{% embed url="https://youtu.be/yoHBowTh4OQ?si=ivf7Rh1NNwblG-d8&t=23" %}

  • Sub Components
    • Question API

      This is used for question management like create, read, update, review, publish etc.

      API Documentation

    • QuestionSet API

      This is used for question set management like create, read, update, review, publish etc.

      API Documentation

    • Flink Jobs Used

      async-questionset-publish [Used for Question and QuestionSet publish]

    • Configuration

  • Developer Installation Guide

Dependencies

Details are listed here for the below specified dependencies

{% embed url="https://youtu.be/mjV0MmP9WuQ?si=Lv8cgzUIYjivNfX8&t=815" %}

API listing

The APIs exposed by the micro service is available here