0

I'm attempting to pipeline the EVALSHA command of Redis inside Spring Data Redis as described here.

However when I attempt to do this using EVALSHA it throws an UnsupportedOperationException as found here in the Spring Data Redis code.

Given that Redis itself supports this:

Sometimes the application may also want to send EVAL or EVALSHA commands in a pipeline. This is entirely possible and Redis explicitly supports it

and Jedis also supports this how come Spring Data Redis prevents it from happening? Is this just a feature that's not yet implemented or is this unsupported because it's not feasible for some reason? If so what's the alternative approach for pipelining scripts in Spring Data Redis?

alex.p
  • 2,627
  • 17
  • 28

1 Answers1

0

I'm not familiar with the details of spring boot, but you could possible create a new script that invokes all of your pipelined commands as a single script. For this to work, you'd need to concatenate all of your scripts into a single script and combine your data so that everything can be executed in the way you need it.

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
  • That's a possibility, however my scripts are already at the most transactional/atomic level in terms of each operation. I was hoping to use pipelining to apply a similar approach as Nagle's algorithm does in TCP but at the Redis layer where I just bulk together many scripts evals and push them together if the TCP socket is congested. – alex.p Mar 17 '19 at 18:47
  • Well, if spring data redis doesn't support pipelining, you either need to use a new library, or try a trick like I suggested. – Andrew Eisenberg Mar 17 '19 at 21:40
  • Yes using an alternative library is a solution (if somewhat obvious) and it's indeed what I've done - however the question is specifically why does Spring Data Redis not support pipelining of EVALSHA commands given both the underlying library (Jedis) and Redis itself is capable of doing this. – alex.p Mar 17 '19 at 22:22