Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client side aggregation for Lua UDFs #6

Open
jhecking opened this issue Jan 23, 2017 · 2 comments
Open

Client side aggregation for Lua UDFs #6

jhecking opened this issue Jan 23, 2017 · 2 comments

Comments

@jhecking
Copy link
Contributor

jhecking commented Jan 23, 2017

Support for MapReduce style of programming using Stream UDFs: http://www.aerospike.com/docs/guide/aggregation.html

@jonas32
Copy link
Contributor

jonas32 commented Nov 17, 2021

I would like to start some discussion on this topic.
My current use case requires this, so now i'm checking if it makes more sense to use another client or implement lua here.

Rust has multiple lua interface libraries, with different targets. lua, hlua and rlua.
rlua is the safe one, hlua is at least partly safe and faster than rlua and lua is probably the fastest.
Interesting post by the rlua author here: https://www.reddit.com/r/rust/comments/8coe49/lua_bindings_lua_hlua_or_rlua/

I think the lua crate is probably not that good for this use case.
rlua looks like the best choice to me, but i would like to hear your opinion on that.

@khaf
Copy link
Collaborator

khaf commented Nov 17, 2021

First, you should check if UDFs on Aerospike could actually solve your issue. They are somewhat flaky when it comes to deterministic performance which can potentially cause headaches.
Second, I don't think performance is much of a problem in this case, since the server usually bunches up reduced values and sends them over to the client, which means the client does not call into lua enough times to cause real-world performance issues.
IMO, which library to use depends on the license and how active, complete and well supported the libraries are. In this case, rlua seems to be ok, although after a brief search I can't find any benchmarks on the internet to get an idea of how much performance penalty we are talking about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants