samyun / southwest-price-drop-bot

Bot that watches Southwest flights for price drops.
Other
74 stars 41 forks source link

Datastore Persistence #45

Closed ribordy closed 5 years ago

ribordy commented 5 years ago

My Redis instance was rebooted by Heroku. As a result, I lost all flights I had been tracking. I don't think Redis is usually intended to be used as a persistent data store, but the paid tiers (starting at $15/mo) of the Heroku Redis add-on do provide persistence and backups. I imagine most users looking to utilize this would be unwilling to pay that cost.

I haven't poked around much to see how data is being stored, but perhaps it's worth exploring something like Mongo or Postgres?

(Mostly looking to start a dialog to flesh out any unseen hurdles before I take some time to further investigate)

I think a postgres DB configured with an ID column and a JSON blob column could more or less serve as a drop-in replacement for Redis

samyun commented 5 years ago

Huh. Seems like you're right - I thought that the Redis datastore was persistent, but according to the documentation, it's not.

You're right - a Postgres or Mongo db would probably be better, but with how busy I've been recently, and with the other bugs to fix, this is something that's going to be pretty low priority. If you, or anyone, wants to jump in and make the change, feel free :)

ribordy commented 5 years ago

:+1: sure thing. If I find some time on the holidays, I'll throw something together.

samyun commented 5 years ago

Added in lastest PR