Introducing Surreal<Any>: Dynamic Support for any Engine in Rust
Blog post from SurrealDB
SurrealDB introduces the Surreal<Any> engine, a flexible solution for dynamically selecting storage engines in Rust applications, allowing developers to switch between different storage solutions like IndexedDB, RocksDB, TiKV, and more without altering the codebase. Its architecture separates the compute layer from data storage, enabling independent scaling of these layers, and supports both local and remote engine configurations through a unified API, with the Rust SDK abstracting the implementation details. The Surreal<Any> module facilitates runtime engine selection based on URL schemes, offering flexibility in development and deployment environments by allowing developers to use in-memory engines for local testing and switch to more robust databases like RocksDB for production, all while minimizing resource-intensive compilation overhead. This approach aligns with SurrealDB's goal of simplifying development, hastening build processes, and enhancing scalability, providing a streamlined developer experience.