Krishi1211 opened a new issue, #238:
URL: https://github.com/apache/incubator-resilientdb/issues/238

   ## Title  
   Add ReSQL: SQL-Based Relational Service Layer for ResilientDB
   
   ---
   
   ## Description  
   
   ### Summary  
   
   ResilientDB currently exposes a key-value (KV) storage abstraction, which 
limits expressiveness for applications requiring relational schemas, joins, 
range queries, and analytical operations.
   
   This issue proposes introducing **ReSQL**, a SQL-based service layer that 
enables relational querying capabilities on top of ResilientDB’s existing 
distributed ledger execution model. ReSQL integrates DuckDB as an embedded SQL 
backend and provides structured relational semantics without modifying core 
consensus or ledger protocols.
   
   ---
   
   ## Motivation  
   
   The current KV model restricts:
   
   - Structured relational schema modeling  
   - Join operations  
   - Range queries  
   - Aggregations and analytical queries  
   - Developer ergonomics for complex application logic  
   
   Applications needing relational features must rely on external database 
systems. ReSQL enables structured SQL interaction directly within ResilientDB.
   
   ---
   
   ## Proposed Changes  
   
   ### Storage & Execution
   - Integrate DuckDB as an embedded SQL engine  
   - Extend execution paths to support SQL-based read/write workloads  
   - Add runtime flags for enabling/disabling ReSQL mode  
   - Maintain backward compatibility with KV-based applications  
   
   ### Service Layer
   - Introduce a dedicated ReSQL service responsible for:
     - Managing SQL contexts  
     - Parsing and executing SQL statements  
     - Handling query lifecycle  
     - Returning structured tabular results  
   
   ### Tooling
   - Add standalone startup scripts for ReSQL  
   - Provide `test_sql` for validating SQL workloads  
   - Include utilities for relational schema bootstrapping  
   
   ---
   
   ## Compatibility  
   
   - Fully optional module  
   - No modifications to consensus or ledger protocols  
   - KV applications remain unaffected  
   - SQL execution enabled via runtime configuration  
   
   ---
   
   ## Validation  
   
   - Successful table creation  
   - Insert and retrieval correctness  
   - Selection and projection validation  
   - End-to-end SQL execution via `test_sql`  
   
   ---
   
   ## Expected Benefits  
   
   - Enables RDBMS-style semantics for decentralized applications  
   - Removes need for external relational DBMS  
   - Improves developer productivity via standard SQL abstractions  
   - Leverages DuckDB’s in-process analytical execution  


-- 
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]

Reply via email to