Merge the two storages and give users the ability to write their own database drivers
CatraProto currently supports the only one session serializer of type FileSerializer Application is hosted in Kubernetes container and it's not comfortable to use FileSerializer because it requires app to have a local path to store session data
My request is to document IAsyncSessionSerializer interface and let end-user to choose what type of storage one would like to use. Currently it's sqlite, but maybe CatraProto should have a separate interface for session storage to abstract away from sqlite and use custom storage together with custom IAsyncSessionSerializer implementations
CatraProto currently supports the only one session serializer of type FileSerializer
CatraProto supports any serializer implementing IAsyncSessionSerializer
My request is to document IAsyncSessionSerializer interface and let end-user to choose what type of storage one would like to use.
IAsyncSessionSerializer is documented here
Currently it's sqlite
IAsyncSessionSerializer and the SQLite database are two separate things:
-
IAsyncSessionSerializer stores vital information about the session (auth_keys, authorization_state, for example) and some less vital, but rarely written stuff such as common updates state and channel updates state
-
The SQLite database instead mainly stores a cache of peers and in the near future also information about files (#1) and messages (#4).
I get it, that IAsyncSessionSerializer and sqlite provider are separate things, what I am talking about is to give ability to use something else but sqlite
Good. Then I would say it's best to just merge the two databases and give the user the ability to write their own driver (while also shipping a default SQLite driver)