I would like to start an issue to discuss the possibility of Redis supporting wasm. Our team actively contributing to communities over the past few years, and we've managed elastic caching on the cloud-based on open source version. We came across a lot of problems with Lua extension scripts. So, I would like to call for a discussion with the community, do we have a newer design to provide secure, lightable, polyglot, and dynamic loadable modules/plugins using WASM, let it be a Lua alternative: matching and outputs (where Lua is used).

WASM modules run in a very restrictive execution environment where they cannot access the network, files, etc. This might be OK for pure algorithmic uses, such as a module that calculates entropy. In the earlier time, we may say it is not suitable if the module requires access to external files, either to read in data from an external source (for example in a Lua rule) or writing to a custom log file (a Lua output). WASI has made this possible in many cases nowadays. It's not that there's nothing overhead with WASM. wasm also requires more overhead on the authors part. Once they have chosen a language, they will have to configure their toolchain to output WASM. While in some cases this may be trivial, it is more overhead than writing a Lua script.

With more and more Open Organization involving in this field (Bytecode alliance, Wasmer, Envoy, Nginx, and so on) WASM outside of the browser has appeared to be very promising.

Comment From: yossigo

Hello @vongosling and thanks for raising this.

I think WASM may be relevant as a future extension to the concept of functions (#8693), and this idea did in fact come up already. Does that make sense to you?

Also, will be happy if you can share more about the problems you've encountered with Lua as in a way, functions were created to address exactly that.