Reputation: 18949
In Redis we have strings that represent input values. We (would like to) have a Lua script that is dynamically generated (after being defined by user using a GUI) that calculates a result string based on the input string. Each set of input values is independent of each other. So this should be trivially parallelisable, however, EVAL
seems to block until completion.
Is there a way in Redis to run a single Lua script across a bunch of values without having to rewrite the script itself to do it?
Upvotes: 0
Views: 906
Reputation: 691
Since Redis
is implemented as a single-threaded server, it would not be possible to run multiple commands from the same client in parallel.
You should be however, be able to run multiple commands, (script
commands included), on multiple clients, and Redis will interleave them in its IO loop.
Having said that, Redis
is not only super-fast, it is also flexible;
Please consider one of the following options:
All the best!
Upvotes: 2