Home / Companies / SurrealDB / Blog / January 2024

January 2024 Summaries

7 posts from SurrealDB

Filter
Month: Year:
Post Summaries Back to Blog
SurrealDB, a multi-model database, offers alternative ways to join data without traditional SQL joins by leveraging document and graph data models. The database supports three primary methods for creating relationships: embedded records, record links, and graph relations. Embedded records allow for denormalization by storing complete information within a single record, enhancing query speed at the expense of increased storage usage. Record links facilitate normalized data models using record IDs to link records, eliminating the complexity of traditional joins and enabling direct record fetching. Graph relations introduce a "relate" statement for establishing graph-based connections, allowing for more flexible and powerful data querying. This method simplifies complex queries and enables bi-directional data traversal by defining relationships at write time, streamlining query processes. Despite trade-offs, SurrealDB's approach simplifies the creation of complex data relationships and enhances query efficiency, distinguishing it from traditional and graph-only databases.
Jan 29, 2024 1,806 words in the original blog post.
A resilient database must effectively manage concurrent transactions while preserving data integrity and consistency, focusing on the Isolation aspect of ACID properties. This blog post explores transaction isolation's nuances and introduces VART (Versioned Adaptive Radix Trie), a persistent data structure designed for snapshot isolation, which is crucial for maintaining database consistency during concurrent access. VART functions as the index within SurrealKV, a persistent in-memory Key-Value store, using Multiversion Concurrency Control (MVCC) to handle concurrent transactions. The post discusses the significance of persistent data structures, which allow access to multiple data versions, and highlights the use of Copy-On-Write (CoW) techniques to ensure persistence and versioning. These structures are crucial for snapshot isolation, providing each transaction with a consistent database view, and aiding in conflict detection and resolution. VART's design, leveraging Adaptive Radix Tries, optimizes search operations and supports both write and read-heavy workloads by offering immutability and versioning. Future improvements include persisting VART on disk for faster recovery, implementing node-caching to enhance read performance, and introducing vertical compression to reduce memory usage.
Jan 23, 2024 4,044 words in the original blog post.
This guide outlines the process of using Auth0 as an authentication provider for single-page web applications that utilize SurrealDB as their sole backend. It provides detailed instructions on configuring Auth0 to issue tokens compatible with SurrealDB, setting up SurrealDB to accept these tokens, defining user-level authorization with SurrealDB scopes, and authenticating users within a single-page application. Additionally, it explains how to retrieve and update information from SurrealDB using authenticated user credentials. While the guide focuses on scenarios where SurrealDB is the only backend, it is still applicable for applications with additional backends or those not strictly classified as single-page applications, offering flexibility in token request and validation methods.
Jan 14, 2024 256 words in the original blog post.
SurrealDB has transitioned to a structured monthly release schedule inspired by the Rust programming language's release train model, aiming to provide predictable updates and enhance efficiency. Previously, feature-driven releases led to unpredictable timelines, creating challenges for users and developers. The new schedule involves three release channels: nightly, beta, and stable, allowing users to test features progressively. On the second Tuesday of each month, a new beta version is released, followed by its promotion to stable status the following month. This approach balances rapid iteration with stability, enabling regular feedback incorporation and consistent development, ultimately improving the platform's reliability and user experience.
Jan 12, 2024 1,146 words in the original blog post.
SurrealDB has introduced a live query feature, accessible through its Rust SDK, allowing real-time monitoring of data changes such as creations, updates, and deletions within a database. This live query capability builds on the traditional SELECT method by adding a "live" component, which enables users to receive continuous notifications of data changes in selected records or entire tables. The feature integrates seamlessly with SurrealDB's existing API, supporting both WebSocket and local key-value store engines, though it is not yet available for the HTTP engine. Users can employ the live query feature to listen to changes on individual records, a range of records, or entire tables, with the Rust SDK handling automatic deserialization and stream management. This development enhances the flexibility and real-time data handling capabilities for users, particularly those utilizing Rust for database interactions.
Jan 10, 2024 1,289 words in the original blog post.
SurrealDB has launched two new Rust crates—surrealdb-nightly and surrealdb-beta—to complement the existing surrealdb crate, facilitating developers who use SurrealDB for database operations. These crates cater to different stages of development and feature readiness: the nightly crate, updated daily with changes from the development branch, allows users to experiment with cutting-edge features, while the beta crate, updated monthly with bug fixes, serves as a more polished pre-release version. The stable surrealdb crate, updated on the second Tuesday of every month, is recommended for production environments. Developers can easily switch between these versions by modifying the package name in their project's dependencies, enabling a seamless transition as features progress from nightly to beta to stable release stages.
Jan 09, 2024 479 words in the original blog post.
SurrealDB's release of version 1.1.0 introduces significant advancements aimed at enhancing developers' experiences, notably with the integration of SurrealML, which simplifies machine learning model deployment by enabling them to run directly within the database using SurrealQL. This update eliminates the need for external platforms by allowing models to be imported and executed seamlessly as part of database operations, extending functionality to custom functions, live queries, and events. The release also includes a new Live Query API for the Rust SDK, offering real-time updates through a simple command, enhancing the interactivity of Rust applications. Additionally, the updated string parsing functionality allows users to specify string interpretations within SurrealQL, providing more control over how data is processed. The release emphasizes community contributions and invites developers to explore the new features and improvements, promising a smoother and more efficient development process.
Jan 09, 2024 880 words in the original blog post.