You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, just to be clear this is not a feature request, just some design questions.
I was wondering if you have any thoughts about cost/benefit of making the DB accept a generic K/V type instead of just strings.
Since tidwall/btree supports generics, maybe BuntDB could support them too. Whatever type is used for the key/values would still have to support serialization for the AOF, but in a lot of cases the data could be accessed as is, without the need to de/serialize.
I understand this would be less safe because of increased chance for inconsistency (because of the possibility of mutations on the items), but should also relieve a lot of the back-and-forth work of serialization, probably also be more efficient in terms of memory consumption and GC.
The other question is whether or not it would make sense to persist secondary indexes. Currently each secondary index needs to be rebuilt in memory each time the app restarts... i'm guessing for an app with many indexes this could become more and more costly each time the app is updated for a new deploy. Perhaps this is fast enough that is not really a problem for production, depending of data size / etc.
Thx!
The text was updated successfully, but these errors were encountered:
EmmanuelOga
changed the title
Question: cost/benefit of making the DB support generic types (as opposed to just strings) and persisting secondary indexes
Question: cost/benefit of supporting generic types; and persisting secondary indexes
Nov 6, 2023
Hey, just to be clear this is not a feature request, just some design questions.
I was wondering if you have any thoughts about cost/benefit of making the DB accept a generic K/V type instead of just strings.
Since tidwall/btree supports generics, maybe BuntDB could support them too. Whatever type is used for the key/values would still have to support serialization for the AOF, but in a lot of cases the data could be accessed as is, without the need to de/serialize.
I understand this would be less safe because of increased chance for inconsistency (because of the possibility of mutations on the items), but should also relieve a lot of the back-and-forth work of serialization, probably also be more efficient in terms of memory consumption and GC.
The other question is whether or not it would make sense to persist secondary indexes. Currently each secondary index needs to be rebuilt in memory each time the app restarts... i'm guessing for an app with many indexes this could become more and more costly each time the app is updated for a new deploy. Perhaps this is fast enough that is not really a problem for production, depending of data size / etc.
Thx!
The text was updated successfully, but these errors were encountered: