...
Drafts Schema ( TBD: have to JSONify)
- APIs import/export for creating, modifying, deleting, listing parts or whole of one or more Views, and their management
- upload/download for creating, modifying, deleting, listing parts or whole of one or more Views
Summary
- Every referable entity in the Sunbird ecosystem is a Term in the Knowledge Graph (KG)
- A Framework itself is described in the KG w.r.t what types of Terms can appear, what relationships are supported, and the compatible bindings between entities.
- Any domain to be modeled such as a Vocabulary or Spine is simply a subgraph (a projection) of the KG. In other words, by applying a set of appropriate filters, we get the desired domain
- Vocabulary has collection of all Terms appearing in any and all Frameworks and it inherits the common world knowledge about them (such as synonyms, examples, translations etc..from WordNet)
- Keywords is again a set of Terms in the KG for a Term in a Framework. So, Keywords is also a certain projection of the KG.
- Every domain is governed by a set of rules and policies. A policy is a composite predicate. A composite predicted consists of one or more predicates joined by relational operators such as AND and OR and NOT. A predicate evaluates to Truth or False. A predicate takes a function of a result set (of a query on a Graph), and applies a comparator operator to a given policy value, which itself could be a result set. Any policy is a template consisting of the result set (of a graph projection), a comparator and reference value set (truth) that can also be a result set.
- Any graph operation can be validated w.r.t the policies to be enforced in that domain
- Policies lend themselves to test cases – thereby this design implicitly enforces TDD approach to building software
- export graph (actual upload csv schema might be different than this. upload is actually a UI component)
- Nodes tab
- <NodeName, additional fields>
- Relations Tab
- <leftNode, rightNode, relationType, additional relationFields>
- Nodes tab
- import graph (same as above)
- edit graph (actual upload csv schema might be different than this. upload is actually a UI component)
- Add Nodes tab (most likely not needed)
- <NodeName, additional fields, PolicyName/ID>
- Delete Nodes tab
- <NodeName, PolicyName/ID>
- Rename Nodes tab
- <OldNodeName, NewNodeName, PolicyName/ID>
- Split Nodes tab
- <OldNodeName, ListOfNewNodeName, PolicyName/ID>
- Merge Nodes tab
- <List of OldNodeNames, NewNode, PolicyName/ID>
- Add Links tab (most likely not needed)
- <leftNodeName, rightNode, linkType, PolicyName/ID>
- Delete Links tab (most likely not needed)
- <leftNodeName, rightNode, linkType, PolicyName/ID>
- Add Nodes tab (most likely not needed)
- export graph (actual upload csv schema might be different than this. upload is actually a UI component)
- APIs for creating, modifying, deleting, listing parts or whole of one or more Views, and their management
- can parallel the import/export/edit syntax
Comments
- For better performance, making Framework, Vocabulary, etc as first entities may be necessary. Handling sets via set membership could result in verbose queries and higher latency
- Node and Relationship (properties) are listed out here
- Policies can also have RBAC-based behavior.
Summary
- Every referable entity in the Sunbird ecosystem is a Term in the Knowledge Graph (KG)
- A Framework itself is described in the KG w.r.t what types of Terms can appear, what relationships are supported, and the compatible bindings between entities.
- Any domain to be modeled such as a Vocabulary or Spine is simply a subgraph (a projection) of the KG. In other words, by applying a set of appropriate filters, we get the desired domain
- Vocabulary has collection of all Terms appearing in any and all Frameworks and it inherits the common world knowledge about them (such as synonyms, examples, translations etc..from WordNet)
- Keywords is again a set of Terms in the KG for a Term in a Framework. So, Keywords is also a certain projection of the KG.
- Every domain is governed by a set of rules and policies. A policy is a composite predicate. A composite predicted consists of one or more predicates joined by relational operators such as AND and OR and NOT. A predicate evaluates to Truth or False. A predicate takes a function of a result set (of a query on a Graph), and applies a comparator operator to a given policy value, which itself could be a result set. Any policy is a template consisting of the result set (of a graph projection), a comparator and reference value set (truth) that can also be a result set.
- Any graph operation can be validated w.r.t the policies to be enforced in that domain
- Policies lend themselves to test cases – thereby this design implicitly enforces TDD approach to building software
- Upload and Download APIs should be treated as UI components. They should not dictate the import and export schema. Upload is an interface to import, and Download is an interface to Export. (So, Export and Import should be quite general enough). Export can be Download but not vice versa. For example, the current Upload API for ToC in Textbook creation implicitly assumes a PARENT_OF relationship, and support upto a depth of 5. This is not generalizable for arbitrary graphs. Instead, the export schema provided can always be reshaped to support a specific/ restricted API.
- Since majority of the code (for basic operations, and validation) is outsourced to the underneath graph engined, the developer can focus on business logic and less on low-level Graph management operations. Less code, less bugs
...