Roadmap
Planned direction for CSharpDB — organized by timeframe and priority. Reflects the current v3.8.0 state.
Near-Term Completed
Recently completed improvements to query performance, storage behavior, provider/tooling compatibility, maintenance workflows, and developer ergonomics.
Source-Generated Collections
DoneNo-reflection, trim-safe typed collection API via CSharpDB.Generators with GetGeneratedCollectionAsync<T>(), GeneratedCollection<T>, generated field metadata, binary direct payloads for supported shapes, and NativeAOT-friendly model registration.
Collection Write-Path Performance
DoneSeparated collection write probes from the read-side B-tree routing-cache, reused traversal scratch during insert/replace, and buffered catalog mutation bookkeeping inside explicit transactions.
Covered Composite Index Fast-Path
DoneRecovered covered composite-index lookup optimization for queries that can be answered entirely from the index without touching the base table.
Durable-Write Batching
DoneConfigurable durable commit batch window to coalesce WAL fsync calls across concurrent transactions for higher write throughput.
DISTINCT & Composite Indexes
DoneDeduplicate SELECT output with DISTINCT. Multi-column indexes for broader query coverage.
Index Range Scans
DoneUse indexes for <, >, <=, >=, BETWEEN — not just equality lookups.
Prepared Statement Cache
DoneCache parsed ASTs and query plans to avoid re-parsing identical SQL statements.
In-Memory Database Mode
DoneOpen a database fully in memory, load from disk, and save committed snapshots back to disk.
Collection Path Indexes
DoneNested scalar, array-element, nested array-object, Guid, temporal, and ordered text path indexes.
B+Tree Delete Rebalancing
DoneMerge underflowed pages on delete to reclaim space via borrow/merge with interior collapse.
Database Administration
DoneMaintenance report, REINDEX, VACUUM/compact, fragmentation analysis, and database size report.
Dedicated gRPC Daemon
DoneCSharpDB.Daemon host with full gRPC coverage for SQL, schema, procedures, collections, and maintenance.
Background WAL Checkpointing
DoneIncremental/sliced auto-checkpointing to move work off the triggering commit path.
Hybrid Storage Mode
DoneLazy-resident durable storage with on-demand page loading and gRPC tunable file-cache.
Table & Index Statistics
DoneANALYZE command with persisted row counts, column NDV/min/max, and initial stats-guided index selection.
Client Backup & Restore
DoneBackupAsync / RestoreAsync as first-class operations across direct, HTTP, gRPC, CLI, and Admin.
Native Table Archives & External Tables
DoneNative .csdbtable snapshots with fast Admin Import / Export, download or server-path destinations, CREATE EXTERNAL TABLE, sys.external_tables, read-only scans/joins, and embedded primary-key lookup indexes.
Older DB Foreign-Key Retrofit Migration
DoneValidate/apply maintenance workflow that rewrites existing child tables with persisted FK metadata across direct, HTTP, gRPC, CLI, and Admin.
Admin Reports Designer
DoneVisual banded-report designer with grouping, sorting, expressions, aggregate functions, page settings, and printable preview.
Mid-Term In Progress
SQL feature parity, provider/tooling compatibility, and ecosystem expansion.
User-Defined Functions and Commands
DoneDone for the trusted in-process model: host-registered C# scalar functions, common SQL/Admin built-ins, trusted commands, Admin Forms/Reports/pipeline hooks, declarative form action sequences, and local Admin Forms C# code modules. Untrusted sandboxed UDF execution is intentionally out of scope.
Writable External Tables
PlannedOpt-in writable external table registrations over mutable .csdbx files, backed by CSharpDB B+tree storage and limited to INSERT, UPDATE, and DELETE in v1 while .csdbtable archives remain read-only.
Window Functions
PlannedROW_NUMBER(), RANK(), DENSE_RANK(), LEAD(), LAG() for analytical queries.
DEFAULT & CHECK Constraints
PlannedDefault expressions in column definitions and arbitrary expression-based constraints per column or table.
Foreign Key Constraints
Donev1 support for single-column, column-level REFERENCES with optional ON DELETE CASCADE, plus metadata/tooling surfaces.
Remote Host Consolidation
DoneCSharpDB.Daemon now hosts the existing REST/HTTP /api surface and gRPC from one long-running process backed by the same warm daemon-hosted client. Standalone CSharpDB.Api remains supported for REST-only hosting.
Remote API-Key Protection
DoneOpt-in API-key mode protects REST /api/* and daemon gRPC calls with constant-time key comparison while keeping default no-auth behavior for compatibility.
Remote Host Security Hardening
PlannedAuthorization, protected admin endpoint scopes, JWT/RBAC options, and TLS/mTLS deployment helpers for remote HTTP and gRPC access.
Daemon Service Packaging
DoneCSharpDB.Daemon can be packaged as a persistent background service across systemd, Windows Service, and launchd.
Cross-Platform Distribution
In ProgressSelf-contained daemon archives and install scripts ship for Windows, Linux, and macOS; dotnet tool, Docker, Homebrew, and winget distribution remain future work.
ADO.NET GetSchema
DoneDbConnection.GetSchema() now exposes standard metadata collections for tooling and ORM schema discovery.
Collation Support
DoneBINARY, NOCASE, NOCASE_AI, and ICU:<locale> collation now work across SQL and collection indexes; dedicated ordered SQL text index optimization remains future work.
Subqueries & Set Operations
DoneScalar subqueries, IN/EXISTS (including correlated), UNION, INTERSECT, EXCEPT across SELECT results.
Visual Query Designer
DoneAdmin query builder with source canvas, join editing, design grid, SQL preview, and saved layouts.
Long-Term Future
Advanced features and fundamental architecture enhancements, including long-range items that have since shipped.
Full-Text Search
DoneInverted index support with tokenization, stemming, and relevance ranking.
Source-Generated Collections
DoneCurrent phase is complete: opt-in generated models provide GetGeneratedCollectionAsync<T>, generated descriptors/index bindings, binary direct payloads for supported shapes, JSON fallback for unsupported shapes, and trim/NativeAOT smoke coverage.
Generated Collection Package Ergonomics
PlannedStreamline NuGet/analyzer packaging, templates, onboarding docs, and project setup for the opt-in generated collection path.
Broader Generated Model Coverage
PlannedExpand generator support beyond the current scalar, scalar collection, nested scalar, and nested collection-scalar shapes.
SQL Batched Row Transport
DoneInternal row-batch transport serves as the batch-first SQL execution foundation across batch-capable result boundaries, scans, joins, and generic aggregates.
External Table Index Coverage
PlannedFollow writable .csdbx storage with broader external-table indexes, planner costing, and multi-column lookup/range support beyond the current archive primary-key point-lookup path.
Page-Level Compression
PlannedDeep engine/page compression remains planned; application-level payload compression is available as a sample/SDK pattern without changing the storage format.
At-Rest Encryption
ResearchEncrypt database and WAL files with passphrase-based key management and explicit plaintext/encrypted migration/export paths; implementation must meet the database-encryption plan entry criteria before shipping.
Cost-Based Query Optimizer
DoneCurrent phase is complete: ANALYZE-driven stats-guided costing uses internal histograms, heavy hitters, composite-prefix summaries, skew-aware estimates, correlation-aware filters/joins, non-unique lookup costing, hash build-side choice, and bounded DP join reordering.
Adaptive Query Re-Optimization
DoneCurrent phase is complete: opt-in adaptive join execution can switch eligible index nested-loop joins to hash joins and flip inner hash build sides at safe pre-emission boundaries.
Public Planner Histogram Inspection
DoneStable SQL-first diagnostics expose sys.planner_histograms, sys.planner_heavy_hitters, sys.planner_index_prefix_stats, and EXPLAIN ESTIMATE FOR <query>.
Async I/O Batching
DoneCurrent phase is complete: WAL frame-chunk writes, chunked checkpoint page copies, shared snapshot/export batching, reusable B-tree copy utilities, and the close-out audit cover the main storage and maintenance write paths.
Low-Latency Durable Writes
DoneAdvisory planner-stat persistence can stay deferred without weakening committed-row durability, and sys.table_stats.row_count_is_exact makes exact versus estimated row-count semantics explicit.
Group Commit / Deferred WAL Flush
DoneOpt-in UseDurableCommitBatchWindow(...) batches durable WAL flushes across contending in-process transactions — an expert measure-first knob rather than default behavior.
Initial Multi-Writer Support
DoneExplicit WriteTransaction conflict-detected retry flow, shared auto-commit non-insert isolation, and opt-in ConcurrentWriteTransactions for shared implicit inserts.
Broader Multi-Writer Optimization
DoneOpt-in concurrent write transactions now reserve shared row-id ranges and rebase hot right-edge insert pages against pending WAL images for improved insert fan-in.
API-Level Sharding
ResearchRoute API/daemon requests across multiple warm CSharpDB database files so independent tenants or shard keys can use separate WAL and commit paths, with v1 focused on single-shard writes and point reads.
Replication & Change Feed
ResearchRetained commit-log change feeds and reactive query subscriptions for read replicas, live Admin views, and event-driven applications.
Current Limitations
Known simplifications in the current implementation:
| Area | Limitation |
|---|---|
| Functions and automation | CSharpDB's UDF/command model is trusted and in-process by design. Current supported surfaces include host-registered scalar functions, common built-ins, trusted commands, form/report/pipeline hooks, declarative action sequences, and local Admin Forms C# modules; untrusted sandboxed execution is intentionally out of scope |
| Query | Scalar/IN/EXISTS subqueries are supported, including correlated cases in WHERE, non-aggregate projection, and UPDATE/DELETE expressions; correlated subqueries are not yet supported in JOIN ON, GROUP BY, HAVING, ORDER BY, or aggregate projections |
| Query | UNION, INTERSECT, and EXCEPT are supported; UNION ALL is not implemented yet |
| Query | No window functions |
| Schema | No SQL DEFAULT column values or CHECK constraints yet. Foreign keys are currently v1 only: single-column, column-level REFERENCES with optional ON DELETE CASCADE; table-level/composite/deferred foreign keys and ON UPDATE actions are not implemented |
| Indexes | Equality lookups support current INTEGER/TEXT indexes, but ordered range-scan pushdown is still limited to single-column INTEGER index paths |
| RowId | Legacy table schemas without persisted high-water metadata may pay a one-time key scan on first insert |
| Collections | FindByIndexAsync supports declared field-equality lookups; FindByPathAsync and FindByPathRangeAsync support path-based queries on indexed paths; FindAsync remains a full scan for unindexed predicates. Generated collections require registered descriptors for existing collection indexes; unsupported generated model shapes warn and use the source-generated JSON fallback instead of binary direct payloads |
| External Tables | Native .csdbtable archives can be registered and queried as read-only external tables. Writable external tables are planned as an opt-in .csdbx format; current archives remain read-only, and broader external indexes, range seeks, and deeper planner costing remain planned |
| Networking | CSharpDB.Daemon now hosts both REST and gRPC from one process; named pipes remain reserved but are not implemented end to end today |
| Security | Remote REST and daemon gRPC support opt-in API-key authentication, defaulting to None for compatibility. JWT, RBAC, mTLS helpers, TLS-specific configuration, and at-rest encryption are not implemented |
| Admin Forms | The Forms designer/runtime supports the core generated-form and data-entry path plus trusted command-backed automation, including lifecycle events, command buttons, selected-control events, conditional UI rules, domain formula helpers, declarative action sequences, and local C# code modules. It still needs Access-parity work for responsive runtime rendering, complete inferred validation, richer form modes, additional events, advanced filtering/sorting, report/query/import/export actions, macro loops/on-error/temp vars, and broader controls |
| Admin Reports | The Reports designer/runtime supports the core banded preview path plus trusted command-backed preview lifecycle events, but still needs Access-parity work for bounded saved-query previews, full report output/export, parameters, richer grouping and totals semantics, conditional formatting, subreports, and broader controls |
| Text / Multilingual | Text is stored as UTF-8 and supports all Unicode languages; default semantics remain ordinal, but opt-in BINARY, NOCASE, NOCASE_AI, and ICU:<locale> collation are implemented for SQL and collection indexes. Dedicated ordered SQL text index optimization remains planned |
| Concurrency | Physical WAL commit path is still serialized at the storage boundary. Initial multi-writer support is shipped, but observed gains depend on conflict shape and whether shared auto-commit INSERT is left on the default serialized path |
| Storage | No page-level compression; the compression SDK sample stores compressed payloads as ordinary application-managed BLOB values |
| Storage | No at-rest encryption for database/WAL files; on-disk storage is plaintext only |
| Storage | Memory-mapped reads are opt-in and currently apply only to clean main-file pages; WAL-backed reads still rely on the WAL/cache path |
| Storage | By default, durable auto-commit single-row writes still pay a physical WAL flush per commit; opt-in UseDurableCommitBatchWindow(...) can trade some commit latency for higher throughput |
| Query | Phase-2 cost-based planning is in place: ANALYZE, sys.table_stats, sys.column_stats, public planner-stat diagnostics, histogram/heavy-hitter/prefix estimates, and bounded small-chain join reordering now feed join/access-path costing. Opt-in adaptive join re-optimization can react to stale-stat or parameter-sensitive join cardinality misses, while broader runtime actuals, EXPLAIN ANALYZE, and full mid-plan reordering remain future work |
| Query | Internal row-batch transport is now the default scan-heavy execution foundation across batch-capable scans, joins, aggregates, and result boundaries; remaining work is broader kernel specialization and optional SIMD-style tuning rather than missing core batch coverage |
Completed Milestones
Major features already implemented and shipped: