Closed binerys closed 7 years ago
@kianadk 🙌🏽
Daang, awesome find. We could add to the main repo or make another one, depends on implementation.. Your plan looks good to me, with mysql :)
Issues with networking within our station and with Student Media has led to a new game plan. Essentially we have no way of publicly accessing the SQL database hosted on our Rivendell machine. This limits us to only two computers that have rivendell database access: the rivendell machine itself and the rivendell client (in the prod room)
Here's my new gameplan on getting that precious rivendell data.
On the rivendell client, run a cron job that will do the following:
/database
. Daily uploads will occur as it takes a while for the sql database to be exported on the client machine. We'll look into hourly updates in the futureImplemented via #103
Elrond - The Lord of Rivendell
Name courtesy of @nathunsmitty
TIL that Rivendell uses a MySQL database and above is a snapshot of the most important table of all - the cart! The cart table features all the songs available in Rivendell. With access to this table, we no longer have to rely on the manually updated google sheet.
Having this data is very exciting because:
Implementation
Here's a rough idea that I have so far: EDIT: See update in comment below, leveraging mysql is currently not an option at the moment
db.js
, maybe call itmysql-db.js
??? This will establish the mysql connectionrivendell.js
model in thedatabase
folder. All this will do is simply query the mysql database for the contents of the Cart tableroutes/panel.js
that will be the GET call for the songs. The song data will be accessible via:https://uclaradio.com/panel/api/songs
For local dev, I have a SQL dump of the current CART table in Rivendell as of March 8th, 2017 (s/o to Brandon for hooking it up). We can use docker to spin up a MySQL container (which is what I'm currently using) for database access.
Concerns
Having two different DB's in one repo doesn't sound like best practice, so I was initially thinking of developing this in a separate repo. However, I'd like to take advantage of Panel's current setup, especially since its only accessible by UCLA radio members.
@hsuregan @ChrisLaganiere Let me know your thoughts on this and any other ideas you have!