Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using WebAssembly for RedisGears #861

Open
zboralski opened this issue Mar 4, 2023 · 1 comment
Open

Consider using WebAssembly for RedisGears #861

zboralski opened this issue Mar 4, 2023 · 1 comment

Comments

@zboralski
Copy link

I understand that you chose JavaScript as the scripting language for RedisGears for a variety of reasons, including a smaller module footprint, better sandboxing possibilities, and the popularity of JavaScript among developers.

However, if sandboxing is the main concern, have you considered using WebAssembly (WASM) instead? WebAssembly is a portable binary instruction format that can run in the browser or on a server, and it's designed with performance and security in mind.

WASM can be compiled from other programming languages like C/C++, C#, Rust, Go, and many more, which means that developers would have a wide variety of options for writing RedisGears scripts. Additionally, using WASM could potentially reduce the module footprint even further than JavaScript, while providing even better sandboxing capabilities.

Of course, I understand that there may be other factors at play in the decision to use JavaScript, but I wanted to suggest WebAssembly as an alternative to consider.

Originally posted by @zboralski in #811 (comment)

@MeirShpilraien
Copy link
Collaborator

Thanks @zboralski .
Please notice that the V8 (the JS engine we are using) already supports wasm, we have a tutorial on how to use it with rust: https://github.com/RedisGears/RedisGears/blob/master/docs/create_development_environment.md#using-webassembly (notice that it is still experimental and might be change in the future).
We also considering adding wasm as a stand alone engine. RedisGears has a plugins mechanism so it will be easy to add more engines in the future. So it is definitely something we consider and investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants