WASM Procedures: Introduction
WASM Procedures: Introduction
Part of: WASM Procedures User Guide
What are WASM Procedures?
HeliosDB WASM Procedures revolutionize database stored procedures by leveraging WebAssembly (WASM) technology to enable:
- Polyglot Programming: Write procedures in 4 languages (Rust, JavaScript/TypeScript, Python, Go)
- High Performance: 10x faster execution than traditional interpreted procedures
- Complete Isolation: 100% sandboxed execution with capability-based security
- Universal Compatibility: Run the same WASM module across any platform
Why Polyglot Procedures?
Traditional database systems lock you into a single procedural language (PL/SQL, PL/pgSQL, T-SQL). HeliosDB breaks this limitation:
- Choose the Right Tool: Use Rust for high-performance computation, Python for data science, JavaScript for JSON processing, Go for concurrent operations
- Leverage Existing Code: Compile existing libraries to WASM and use them directly
- Team Flexibility: Different teams can use their preferred languages
- Future-Proof: WASM is a W3C standard supported by all major platforms
Key Benefits
1. Performance: Sub-10ms Execution
Traditional PL/pgSQL: ~50-100ms per callWASM Procedure (Rust): ~5-8ms per callWASM Procedure (JS): ~8-12ms per callWASM Procedure (Python): ~10-15ms per callWASM Procedure (Go): ~6-10ms per callWhy so fast?
- JIT compilation to native code
- Zero-copy memory access
- Instance pooling and reuse
- AOT compilation support
2. Security: Capability-Based Isolation
Every WASM procedure runs in a sandboxed environment with:
- 13 Capability Types: Fine-grained permission control
- Resource Limits: CPU, memory, fuel metering
- System Call Filtering: Block dangerous operations
- Network Isolation: Optional network access
3. Portability: Write Once, Run Anywhere
WASM procedures are:
- Platform-independent (Linux, Windows, macOS)
- Architecture-agnostic (x86, ARM, RISC-V)
- Version-independent (binary compatibility)
Navigation:
- Next: Quick Start
- Index: WASM Procedures User Guide