This commit introduces a new Storage trait, which allows granular
storage and retrieval of channels, messages, names and metadata.
Implementations of this trait can choose whether they return owned data
(in case they don't store the data as is) or borrowed data (in case, the
data is stored as is). The interfaces does not allow the modification of
data in-place (which would be the most efficient approach), however it
provides a greater flexibility, which is in particular needed for
storages not storing the data as is.
The app_data field is removed and the access to channels and messages
is done via ids into the storage. Channels are identified by
ChannelId, messages by the channel they belong to and arrived_at.
Channels do not contain messages anymore.
The storage trait is implemented for the current (non-efficient) json
data model.
This is a pre-requisite to migrate to a sled backend.
This commit introduces a new
Storage
trait, which allows granular storage and retrieval of channels, messages, names and metadata. Implementations of this trait can choose whether they return owned data (in case they don't store the data as is) or borrowed data (in case, the data is stored as is). The interfaces does not allow the modification of data in-place (which would be the most efficient approach), however it provides a greater flexibility, which is in particular needed for storages not storing the data as is.The
app_data
field is removed and the access to channels and messages is done via ids into the storage. Channels are identified byChannelId
, messages by the channel they belong to andarrived_at
. Channels do not contain messages anymore.The storage trait is implemented for the current (non-efficient) json data model.
This is a pre-requisite to migrate to a sled backend.