d-manevich / mc-server-status

1 stars 1 forks source link

Persistant storage #9

Open tsvetkovv opened 1 year ago

tsvetkovv commented 1 year ago

As the project evolves and grows, we are encountering limitations with our current app state storage approach, which relies on a file-based system. To address these limitations and enhance the scalability, performance, and reliability of the application, I propose integrating a Postgres database as the new storage solution for the app state.

Background

Currently, the app state is stored in a file, which has served us well during the initial stages of development. However, as the user base and data volume increase, we foresee potential challenges and drawbacks with this approach, including:

Proposal

To address these concerns and future-proof our application, I propose adopting a Postgres database to manage the app state. Postgres is a robust and widely-used relational database that offers several benefits, including:

Tasks

Acceptance Criteria:

I already started implementation. Let me know your thoughts before I roll out a huge pull request.

d-manevich commented 1 year ago

I'm worried about the complexity of infrastructural support for such a solution We use a small amount of data and it is not critical for users We only need to store data for online statistics for the last month But for the sake of such a problem, I consider it redundant to create and maintain a complex infrastructure, with database support, backups, etc. Apart from the increasing complexity of transferring the bot between servers

d-manevich commented 1 year ago

As an intermediate solution, I propose to make the use of databases optional, and I propose to consider no code solutions, such as firebase, etc.

A77AY commented 1 year ago

I will try to transfer to vercel serverless

A77AY commented 1 year ago

there is also a KV database