barrucadu / yukibot

An IRC bot, and associated libraries, for the ##compsoc-uk-anime channel on Freenode
MIT License
10 stars 2 forks source link

Database #15

Closed barrucadu closed 9 years ago

barrucadu commented 9 years ago

Currently mutable state is serialised in the configuration file on termination, this has a couple of issues:

Both issues could be solved by having a small database. Just a key-value store namespaced by plugin would suffice. Furthermore, by separating configuration from state, much of the serialisation stuff can be dropped, and the configuration file can be read-only. If more rich serialisation is required than key-value, the existing Aeson instances for everything can be re-used when reading/writing to the database.