As far as I understood Ruby client does not support Stream UDF queries. Is it because of nature of Ruby and impossible to implement? Or is it just matter of time and next release may support?
Hi @bayram, good question!
Stream UDFs are used for Aggregation, i.e. to aggregate query results in a distributed fashion. That means each server node performs the aggregation on the data it stores and produces an intermediate result. But it is the client that performs the final aggregation step, combining the intermediate results from all the nodes.
The Ruby client is not yet integrated with the Lua JIT compiler, therefore it cannot perform this final aggregation step. This integration is non-trivial and there are a lot of subtle complexities around converting data types between the Aerospike database, the Ruby runtime and the Lua runtime. To-date, only the Java client, the C# client, the C client and all the clients that wrap the C client internally (Node.js, PHP, Python) support client side aggregation using Lua Stream UDFs.
Aggregation support is for the Ruby client is an often requested feature. But at the moment we do not have any concrete plans when this feature will be implemented.
Go client also supports Stream UDFs and it does not wrap C client, but uses pure Go Lua library.
You are right, I forgot to mention the Go client. But my point wasn’t that only clients that wrap the C client support query aggregation using Lua Stream UDFs. The Java and C# clients do not wrap the C client either and directly interface with the Lua JIT instead.