Burnfireblaze opened a new pull request, #224: URL: https://github.com/apache/incubator-resilientdb/pull/224
# Description This PR introduces ReSQL, a SQL-based service layer for ResilientDB that enables relational querying capabilities on top of the existing distributed ledger execution model. The ReSQL service provides an alternative or replacement for traditional key-value storage with a structured relational storage model backed by DuckDB, allowing decentralized applications to interact with ResilientDB using standard SQL semantics rather than low-level KV operations. ## Under the hood ### Storage & Execution - Integrates DuckDB as an embedded SQL backend within ResilientDB. - Extends the existing KV executor to support SQL-based read and write execution paths. - Adds runtime flags for enabling and configuring ReSQL mode. - Introduces relational metadata and schema management via DuckDB catalogs. - Enables relational table creation, insertion, selection, and update semantics over decentralized application data. ### Service Layer Implements a dedicated ReSQL service responsible for: - Initializing and managing the embedded DuckDB instance. - Handling SQL connection contexts and query execution lifecycles. - Parsing and executing SQL statements. - Returning structured tabular results to clients. - Providing a higher-level interface suitable for decentralized application workflows. ### Tooling & Scripts - Adds standalone startup scripts for launching the ReSQL service. - Adds test tooling (test_sql) for validating execution of SQL workloads. - Provides developer-facing utilities to bootstrap relational schemas and queries on ResilientDB. ## Motivation ResilientDB currently exposes a key-value storage abstraction, which limits expressiveness for applications requiring relational schemas, joins, range queries, or analytical operators. ReSQL introduces an embedded relational interface backed by SQL, enabling application developers to model state with structured schemas without relying on external DBMS systems. ## Compatibility & Deployment - ReSQL is an optional module and does not modify or interfere with ResilientDB’s core consensus or ledger protocols. - KV-based applications remain fully compatible without changes. - SQL execution can be selectively enabled through runtime flags. ## Testing & Validation Validation included: - Data insertion and retrieval queries. - Selection and projection operators. - Basic relational schema management. - End-to-end execution tests via test_sql. ## Benefits - Enables RDBMS-style semantics for decentralized applications. - Allows structured data modeling and querying without external services. - Leverages DuckDB’s in-process analytical engine for efficient SQL execution. - Improves developer ergonomics through familiar SQL abstractions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
