I’ve spent the last couple of days trying to find a good solution for batch get object. I noticed in the client there is BatchGet but no BatchGetObject.
The problem I’ve run into is not being able to store floats using Put, so I have to use PutObject, which requires me to use GetObject. However there is no BatchGetObject so I’d have to fire off a new request for potentially hundreds of different ids - which is not a great solution.
I tried to use PutObject and then Get, but then you lose the data type unpacking that you get with GetObject. I attempted to create a decoder myself using reflection, only to discover that yes, the values are all stored as ints and there’s no obvious way to turn them back into floats without the unexported unpacker.
It appears to me that the client forces you to make one of two choices: 1, use Get/Put and have batch get, but forgo the ability to store floats; or 2, use GetObject/PutObject, but completely lose the ability to batch get.
I would love it if someone could clarify this or point me in the right direction if I am missing something obvious.
The reason there is no BatchGet is that I was waiting to get some feedback from the community to see if the direction I was going was useful to others. BatchGet and Scan/Query would follow after a positive feedback. Since nobody came back (and I got one negative feedback that I was making the library too complicated), I didn’t follow through.
In your case, as a workaround before I add *Obj methods to other API, you can get your bins as integer, convert them to byte, and reconvert the byte to floats.