internetarchive / internetarchive/openlibrary
Investigate replacing most of infobase with modern postgres
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
Infobase, the data layer of infogami, has a lot of code to handle making things like making the JSON objects it calls "Things" queryable efficiently. Modern postgres JSONB columns lets you do a lot of this out of the box. We could probably drastically trim back infobase if we let postgres handle these things. Although how much of a nightmare that would be remains to be determined :P
We'd likely want to investigate the tables in the local dev env, and see how many of them we can get away deleting. Most of the code change would likely be in infogami here.
There is a table somewhere in infobase like:
| ThingID | JSON |
| :------ | :--- |
| `1234553` | `'{"key":"OL1W","type":"/type/work","title":"The Work"}'` |
But since infobase was created before postgres supported json columns, the JSON column is just a plain string. Infobase then implement a lot of extra logic to parse the JSON and make it queryable.
### Related files
### Stakeholders
@mekarpeles
Contributor guide
Assessment
This issue has not been assessed yet.