IN DEVELOPMENT DON'T USE IN PRODUCTION (wait stabilization)
- database in development and might rapidly change syntax
in_memory/embedded (single file) database
Example of using in code
Roadmap
Operations
- Find
- Basic execution
- Handle filtering, limiting, etc.
- Indexing (B+tree)
- Mongo-style cursor
- Insert
- Simple one-doc insert
- Ids
- Indexing (B+tree)
- Update
- Simple bulk update by filter
- Delete
- Delete operation by filters
ACID
Now, impliment AC__ (atomicity, consistency, isolation, durability).
- Atomicity
- Basic functional for all operations (RecoveryUnit)
- Session catalog (TransactionParticipant -> txnNumber, recovery unit (changes) )
- Multi-document transactions (based on session catalog)
- Refactor Recovery Unit
- Fully “All or Nothing” atomocity
- Consistency
- Develop new: Inconsistent because of "collection catalog"
- Validation hooks or constraints during commit
- Isolation
- Locks
- Durability
- WAL (Write Ahead Log)
- Crash recovery on startup
Rest
- More efficent Space managment system
- Trash (_system_trash)
- Storage pages like in mongo
-
Redesign filters? (mb include limits etc. inside)
-
SQL (startdb query language) parsing
quick roadmap:
documnet [x] collection [x] findCollection [x] insertCollectionByOffset [x] insertOne [x] insertCollection [x] insertDML [x] find [x] findDML [x] find({args}) [x]
- bson
- Atomicity
- Durability
- session catalog (TransactionParticipant -> txnNumber, recovery unit (changes) )
- Consistency (almost, check about collection catalog)
- Isolation
- limit
- insertMany
- storage-pages
- delete
- make lazy col. check if collection catalog lookup don't find
- indexes
- SQL parsing
- Concurency (RwLock)
How does it works?
Based on start-storage crate, database first keeps 100 bytes header.
Next it (sys-master) contains tables, first system-tables (like sys-master, then sys-trash)
At second, it keeps user tables. Each table is linked list.
TO REMEMBER
redesign dbs - collection-master doc-next key as next document, doc-content-next as next collection