zio-redis icon indicating copy to clipboard operation
zio-redis copied to clipboard

Implement scripting API

Open mijicd opened this issue 4 years ago • 1 comments

Extracted from this comment authored by @regis-leray.

Commands

  • [x] EVAL script numkeys key [key ...] arg [arg ...] Execute a Lua script server side
  • [x] EVALSHA sha1 numkeys key [key ...] arg [arg ...] Execute a Lua script server side
  • [ ] SCRIPT DEBUG YES|SYNC|NO Set the debug mode for executed scripts.
  • [x] SCRIPT EXISTS sha1 [sha1 ...] Check existence of scripts in the script cache.
  • [ ] SCRIPT FLUSH Remove all the scripts from the script cache.
  • [ ] SCRIPT KILL Kill the script currently in execution.
  • [x] SCRIPT LOAD script Load the specified Lua script into the script cache.

Tips

  • Define the API in zio.redis.api.
  • Command-specific options should be defined in zio.redis.options.
  • Additional inputs and outputs can be defined in zio.redis.Input and zio.redis.Output, respectively.
  • Redis API evolves, therefore the commands listed above might be slightly changed. Double check the official docs before starting with implementation.
  • Use telnet to understand command protocol details.
  • Write inputs and outputs tests in zio.redis.InputSpec and zio.redis.OutputSpec, respectively.
  • Write integration tests by expanding the zio.redis.ApiSpec.
  • If you feel that the pull request size is growing out of control, feel free to split it but make sure to link this issue in each of the related PRs.

mijicd avatar Nov 20 '20 10:11 mijicd

(Partially) implemented by @anatolysergeev in #269

mijicd avatar Jan 06 '22 12:01 mijicd

@mijicd, can I work on this one?

drmarjanovic avatar Feb 07 '23 21:02 drmarjanovic

All yours!

mijicd avatar Feb 07 '23 21:02 mijicd