I am planning to use badgerdb as key value store.
I need suggestion on how to model the data inside. value type I am planning to store is object(Struct). Each tenant can have upto 1M value objects and each object contains 30 attributes. Value object is updated very frequently.
- Shall I store the entire object as byte array?. Will there be the performance cost in serializing and deserializing the value multiple time.
- Shall I store each attribute of object as value with key prefixed like objid:attrname?
- Also I have requirement to find all the key, value pairs modified in time window. How can I get this info.
- Shall I create multiple baderdb instance for each tenant or use prefix based keys?
–Madhu C S