aerospike / aerospike-client-rust

Rust client for the Aerospike database
https://www.aerospike.com/
Other
82 stars 29 forks source link

Support Predicate Filtering #70

Closed jonas32 closed 4 years ago

jonas32 commented 4 years ago

Hello,

i just started to implement the Rust Client into one of my Services. While doing that, i found out that it is not supporting Predicate Filtering filtering. It would be great if this Client would also support it. Querying for multiple secondary bins is really hacky without this.

Thanks Jonas

jhecking commented 4 years ago

Hi @jonas32, yes, that would be great! Honestly speaking, the fastest way to get that feature added would be to submit a pull request, if possible? I could provide guidance and feedback, but do not have the time myself to take this on end-to-end at the moment.

jonas32 commented 4 years ago

Hey @jhecking, i can try to implement it. I also dont have much time to do it. It might take some time and probably your guidance will be needed.

khaf commented 4 years ago

Since time is at a premium for all involved, I'd caution against this for a few months, since the current predicate expressions are going to be deprecated on the server side and a new API will be released in the new few months. All efforts on this issue until then will be wasted effort.

jonas32 commented 4 years ago

At some point it would be wasted, but on the other hand, its an important feature. For me, this library is nearly useless without it for example. I would have to use the C lib with Rust bindings. Im not sure if i could even finish the old API before the new API is released, but im sure the old one wont be removed for legacy reasons. And supporting both cant be bad.

khaf commented 4 years ago

Per the current plan, the old API will be removed, both from the server and the clients.

jonas32 commented 4 years ago

Ah ok. That changes it. I guess the new API is not yet documented? Do you have any infos on how long we have to wait until the release of the new one?

khaf commented 4 years ago

No dates, but in near future. The old APIs will be supported on the server for a short while, but there will be a clean cut on the newer releases of the clients.

rbotzer commented 4 years ago

Hi @jonas32. When the new predicate filter is in place (targeted for version 5.2) the server will still support the current API. It will be deprecated, but not removed until a later version. This gives you many months to use the current API, if you implement it. Your PR would be appreciated.

jonas32 commented 4 years ago

Thank you for this Information @rbotzer. I will try to implement it and open a PR as soon as it works.