Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-7493

[RESP] Lua scripting feature

XMLWordPrintable

    • lua_scripting_8.6
    • False
    • None
    • False
    • 100% To Do, 0% In Progress, 0% Done

      Implementation details

      We need to implement the following RESP commands:

      • EVAL, EVAL_RO, EVALSHA, EVALSHA_RO, SCRIPT LOAD|EXISTS|FLUSH which implement the "legacy" way of loading/running Lua scripts since Redis 2.6.0
      • FCALL, FCALL_RO, FUNCTION LOAD|DUMP|RESTORE|FLUSH|LIST|DELETE|STATS

      In order to execute the scripts we will need to include some additional dependencies which need to be productized. These are all part of the luajava library:

      • party.iroiro.luajava:luajava, pure java
      • party.iroiro.luajava:jsr223, pure java
      • party.iroiro.luajava:lua51, pure java
      • party.iroiro.luajava:lua51-platform artifact which must be natively compiled for the supported platforms (x86_64, aarch64, s390x, ppc64le)
      • com.badlogicgames.gdx:gdx-jnigen-loader, pure java

      Limitations

      • Because the luajava doesn't currently expose methods to register custom lua hooks, we cannot implement some functionality, notably: script/function kill and debug
      • lua scripts are "atomic" in the single-threaded redis world. In Infinispan this behavior will only be possible when the cache is transactional (it is not by default).

      Acceptance criteria

      Passing the upstream RESP Lua test suite and documentation on any behavior differences from the upstream commands: https://github.com/redis/redis/blob/7.2.5/tests/unit/scripting.tcl and https://github.com/redis/redis/blob/7.2.5/tests/unit/functions.tcl

              ttarrant@redhat.com Tristan Tarrant
              rhn-support-afield Alan Field
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: