-
Notifications
You must be signed in to change notification settings - Fork 279
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
Migrate from CAS to Lua(or Javascript) scripts for Redis integration #410
Comments
Unfortunatelly, I was unable to find any mature library for Lua 5.1 that supports BigIntegers. All publically available solutions like https://github.com/ennorehling/euler/blob/master/BigNum.lua or https://github.com/empyreuma/bigint.lua were failed to pass my tests. So, there is only one way to support Lua - forget about precision. |
Looks that it is better to wait Javascript API to be generally available and instead of hacking with legacy Lua. |
A docker container with Javascript support is already available https://hub.docker.com/r/redislabs/redisgears |
It worth to consider to try Kotlin-JS instead of writting js code from scratch. In the theory this should allow to reduce the efforts in following points:
Some additional thought about trying Kotlin described there #283 |
Also, it needs to try TeamVM, it looks more promising than kotlinjs, because works with bytecode, as result it is not nessesary to copy something into kotlin. |
Motivation:
In order to increase scalability and latency, because CAS is not scalled for contended keys.
The math problem:
Redis support only legacy
5.1
Lua interpreter without support of 64 bits integer, and only double arifmetic is available. While currently CAS uses Longs provided by JVM. It makes impossible for some scenarios to write unit tests that checks that nothing changed after migration, because double arithmetic is not accurate for some corner cases.Proposed solutions of math problem:
The text was updated successfully, but these errors were encountered: