π¬ What's Novel
- WebAssembly as compilation target for database query operators with a stable ABI
- Portable query execution across server (Wasmtime), browser (native Wasm), and edge (CDN workers)
- Query shipping framework based on Wasm-compiled query plans sent to data locations
- Performance analysis of Wasm operators for data-intensive operations (within 2x of native)
π§ Technical Approach
Phase 1 β Operator Library
Core operators (scan, filter, project, join, aggregate) implemented in Rust and compiled to WebAssembly modules. A stable ABI for data exchange between operators and the runtime.
Phase 2 β Query Compilation
Plan-to-Wasm compilation: operator selection from the library, operator fusion for pipeline efficiency, and serialization of compiled plans for network transmission.
Phase 3 β Runtime Environments
Three deployment targets: server-side execution via Wasmtime, browser-based execution via native Wasm support, and edge node execution on CDN worker runtimes.
Phase 4 β Optimization
SIMD utilization within Wasm, memory layout optimized for cache efficiency, and streaming evaluation patterns to handle result sets larger than available memory.
π§ͺ Hypotheses
Wasm query operators achieve performance within 2x of native execution while providing safety guarantees and portability.
Wasm operators can execute in browsers, enabling client-side query evaluation over locally cached data.
Wasm compilation enables query shipping to edge nodes, reducing data transfer compared to result shipping.
π SkeinDB Integration
π Key References
- Neumann β "Efficiently Compiling Efficient Query Plans for Modern Hardware" (2011)
- Haas et al. β "Bringing the Web up to Speed with WebAssembly" (2017)