Zabbix-in-Telegram icon indicating copy to clipboard operation
Zabbix-in-Telegram copied to clipboard

Cache: txt -> sqlite3

Open ableev opened this issue 8 years ago • 4 comments

Hard to support text files, better to move to sqlite

ableev avatar Jun 28 '17 10:06 ableev

I do not know why you want to make such a big dependence. In my opinion, it is necessary to introduce appropriate abstractions. Then all operations will be simple. Cache should not be too large to constantly read the entire file, so you do not need indexes from a regular database.

ad-m avatar Sep 12 '17 09:09 ad-m

@ad-m , if we are talking about interactive bot, there are too many things to store, messages id, updates id, etc... It's not right to read a bunch of files every time you need some historical info (about previous notifications, messages or graphs).

ableev avatar Sep 12 '17 09:09 ableev

Of course, for interactive bots there are more data.

But I wonder if there is enough data to make such a dependency, or just serialize the state to plain JSON file. This allows for a flexible approach to the data schema like NoSQL.

ad-m avatar Sep 12 '17 10:09 ad-m

@ad-m , I will think about it, thanks! Maybe having option to enable/disable sqlite/txt is better.

ableev avatar Sep 12 '17 11:09 ableev