Is there a way to have a Lua script trigger on every new record added to a Redis stream? What I’m trying to do is to reconstruct a certain state from, effectively a WRITE-AHEAD-LOG events that are being pushed into a Redis stream. The state itself will be kept in usual Redis structures (hashes, etc.)
Yes I have looked at keyspace notifications – but I need something sitting inside the database to react to those – I was hoping this could’ve been a Lua script running inside of Redis, but I couldn’t find any examples of that. Would appreciate if you can point me to how this can be done – all I could find was some experimental work that requires patching Redis https://matt.sh/advanced-redis-pubsub-scripts
I didn’t know about Redis Gears – thanks for pointing that out. It looks like the scripting language there is Python tho, and I was hoping for something much lighterwieight like Lua.
My biggest concern is Python dependency itself – this is Redis in embedded environment and dragging Python int would blow up disk budget 1.5x unfortunately.