database icon indicating copy to clipboard operation
database copied to clipboard

Better DB interface DX

Open Harjot1Singh opened this issue 2 years ago • 0 comments

Motivation

As the database has grown and our usage has become more refined and clear, it would be easier to access the database in json format. In addition since the content is mostly static, it would help to have the higher performance of a document based db. Lastly, since setting out to work on database, it was not clear that we would eventually have a mobile app. Our current options do not work well for that.

Goal

  • Create a new database that is better for APIs, mobile apps (including delta sync), and static content (including growing/partial db "collections" document stores).
  • Easier to use in JSON, not requiring building sqlite3 binaries or any kind of binary at all in javascript/python any modern language that can leverage JSON.
  • Set up content to be based off of existing publications/historic sources. Needs to account for variable line count (2 lines in source A, 1 line in source B), re-ordering of lines (e.g. manglacharan before or after in various sources), and applying vishraams to varying pad-ched interpretations.
  • Lastly, as a bonus point to discuss: to include non-conforming content such as long form translations of multiple lines. (Today we split up these translations as we see fit, but for example some of the original sources will do translations after an entire pauri). This would in the future be potentially better than serving pdf images of the content to save bandwidth.
  • Split up codebases/repos so that database is just content, tooling to go elsewhere?

Example

Line

{
  "id": "0NVY",
  "content": [
    {
      "name": "SGPC_2018",
      "value": "<> siq nwmu krqw purKu inrBau inrvYru; Akwl mUriq AjUnI sYBM gur pRswid ]"
    },
    {
      "taksal":  "<> siq nwmu krqw purKu inrBau inrvYru; Akwl mUriq AjUnI sYBM gur pRswid ]"
    }
  ]
}

Stories/Tasks

  • [ ] #1882
  • [ ] #1881

Harjot1Singh avatar Nov 07 '21 14:11 Harjot1Singh