A SQL database seems like a much cleaner and more permanent way to cache data for videos/streams as well as channel metadata. Response objects from the YouTube API will be parsed and sent to the database using the nodejs driver for whatever database technology is used. A secondary system (another rpi) should be used to serve the database so that the performance of the main program is unaffected. It is currently unclear whether a relational or object-store database model would be a better fit. The structure of YouTube's API response is unlikely to change but not impossible. In the case of the channels themselves, there may also be a use case for storing information not found in the API response (such as birthdays or links to profiles on other platforms).
A SQL database seems like a much cleaner and more permanent way to cache data for videos/streams as well as channel metadata. Response objects from the YouTube API will be parsed and sent to the database using the nodejs driver for whatever database technology is used. A secondary system (another rpi) should be used to serve the database so that the performance of the main program is unaffected. It is currently unclear whether a relational or object-store database model would be a better fit. The structure of YouTube's API response is unlikely to change but not impossible. In the case of the channels themselves, there may also be a use case for storing information not found in the API response (such as birthdays or links to profiles on other platforms).