Closed carter214 closed 4 years ago
From what I understand, you are trying to implement a sort of time-series datastore via Aerospike.
You should keep in mind that the size of a record in Aerospike is limited (consult our documentation on the website for the current limit), and the record cannot grow over that size.
At the moment there is no API that provides the bin list. I can see two solutions:
Client
object, and provide your own API around it. In the wrapped Put
method, always keep a meta field like __binNames
in which you keep the list of bin names in the record.Let me know if I can help you any further.
Thank you for your response. Solution 1 would work to solve my problem. It does add complexity to every client, not all of our micro services will be written in Go.
Could I write a UDF to iterate over all bins in a record and run the MapGetByKeyRelativeIndexRangeCountOp
on each of them? This would provide the data I actually need.
The bigger concern is the record size as you mentioned. With the record limit that makes Aerospike a non-starter for this project.
Thanks again. I will keep Aerospike in mind for other projects.
I'll go ahead and close this ticket. Don't hesitate to open a new one in case you had other questions.
Hello,
I want to query Aerospike to get all bins for a key. The
GetHeader
does not include the bin names and I cannot find another method that will provide this.Here is the reason why I want this information. I am trying to prototype an implementation of Uber's Schemaless design in Aerospike.
Each bin is an ordered map with the key as a timestamp and the value as a blob of data. In my case each micro service will have its own bin. Due to the dynamic nature of our system, we do not know the list of bins a head of time (new services are added all the time) and which bins could apply to a record.
For namespace
test
in setcomputer
and keysystem1
we have the following data.I want to query to find what
system1
looked like at any time T or the latest view (time at infinity). If a value is not defined at a specific T then the previous value should be returned.If I know the bin names then I can use
MapGetByKeyRelativeIndexRangeCountOp
to get the values.Example code
Any help is appreciated.