zachkont / dotaUpdatesBot

A telegram bot for dota2 updates
GNU General Public License v3.0
23 stars 23 forks source link

Migrate to a proper database system #15

Open zachkont opened 7 years ago

zachkont commented 7 years ago

JSON files are easy to use but far from ideal. Migrating to MongoDB is the obvious choice, but I would prefer something more... editable, for testing purposes and future usage of the saved links in other projects. Or at least some accompanying scripts for basic CRUD and display on the DB.

Suggestions are welcome

TimJentzsch commented 7 years ago

Instead of directly using the json commands in the main method it would probably be a good idea to call seperate functions, e.g. to add a user to the subscription list, so that we can later easily change the data base system in the utils.py instead of the main module, at least that's how I would do it in Java. Thoughts?

zachkont commented 7 years ago

Until we change the current system to another one yeah, it does sound like a great addition

jdbohrman commented 6 years ago

What about AWS? It's a super easy way (But powerful) way of doing it. I could get started on it tomorrow.

zachkont commented 6 years ago

I am not sure what you mean, are you suggesting moving the entire bot on AWS and use their infrastructure? Last time I checked the free tier didn't cover my needs, do you have any specific proposal?

jdbohrman commented 6 years ago

I'll submit an issue with my suggestions

Mindavi commented 6 years ago

I'm wondering why you'd want to migrate to a database when json files are working properly/are good enough at this point in time.

zachkont commented 6 years ago

Besides the general "cleanliness" of a proper data management system, I believe that file I/O is the main culprit behind the issues described in #47. However, the server has been performing flawlessly for the past couple of months so maybe it was something else.