I noticed this pattern in my programs: I'm building a system, like the one I'm building for my local hackerspace right now. It's using database as its "brain" - a scraper as a separate service fetches building rental advertisements and a chat bot announces them on a task-related group chat. Both synchronize using the database.
The problem is, that the API we use to communicate with the chat requires me to keep track of one or more variables that need to persist across reboots and service restarts for the bot to operate properly. They don't really have much in common with each other, but it's tempting to just create a "bot_inner_state" (key TEXT PRIMARY KEY, value TEXT) table and be done with this.
At the same time, it kind of feels like bad design - especially when there's just one variable to keep. Are there any other sensible options? I assumed that since I have one mode of storage for non-configuration data, it would make sense to use it for everything, but basically every option feels like a compromise of sorts.