NexosDB is a persistent, embeddable, lightweight and powerful key-value store designed for applications requiring fast access, strong consistency guarantees, and efficient storage utilization. NexosDB leverages the power of LSM-trees for efficient data organization and retrieval.
Core Operations:
- CRUD operations: Insert, Get, Update, Delete
- Key-Value data model: Immutable keys, arbitrary values, TTL support
Storage and Persistence:
- In-memory memtable for fast writes
- Persistent storage with SSTables (sorted string tables)
- Write-Ahead Log (WAL) for durability
- Background compaction to merge SSTables and optimize storage
Performance and Scalability:
- LSM-tree based storage for efficient reads and writes
- Index structures (Bloom filters, sparse indexes) for faster lookups
- Concurrency control for safe concurrent access
- Atomic operations for data integrity
Data Consistency:
- Strong consistency guarantees (transactions)
- Error handling for missing keys, capacity limits, and other failures.
To start using NexosDB, install Go 1.23 or above.
NexosDB needs go modules. From your project, run the following command
$ go get github.com/imariom/nexosdb
This will retrieve the library.
To use NexosDB as an embedded key-value store, import as:
import nexos "github.com/imariom/nexosdb"
db, err := nexos.Open("my.db", 0600, nexos.options{})
if err != nil {
return err
}
defer db.Close()
The top-level object in NexosDB is a DB. It is represented as a single file on your disk and represents a consistent snapshot of your data.
To open your database, simply use the nexus.Open() function:
package main
import (
"log"
nexos "github.com/imariom/nexos"
)
func main() {
// Open the my.db data file in your current directory.
// It will be created if it doesn't exist.
db, err := nexos.Open("my.db", 0600, nexos.options{})
if err != nil {
log.Fatal(err)
}
defer db.Close()
...
}
NexosDB is actively under development, with a focus on continuous improvement and expansion of functionalities. Here's a glimpse into the upcoming roadmap:
-
Phase 1: Feature Enhancements (Next 3 Months)
- Implement sharding and replication for horizontal scalability and fault tolerance.
- Introduce full-text search capabilities for efficient data retrieval based on text content.
- Explore in-memory caching options for further performance optimization.
-
Phase 2: Advanced Use Cases and Integrations (Next 6 Months)
- Investigate support for Document and Vector oriented data with specialized storage and query features.
- Integrate with popular messaging systems for real-time data exchange.
- Allow for user-defined data types and schema flexibility.
-
Phase 3: Community Building and Long-Term Vision (Ongoing)
- Enhance documentation and developer guides for broader adoption.
- Foster an active community for collaboration and knowledge sharing.
- Explore potential database-as-a-service (DBaaS) deployment options.
Contributions are welcome! If you'd like to collaborate, please:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add YourFeature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a Pull Request.
Distributed under the MIT License. See LICENSE
for more information.
Mário Moiane - [email protected]
- Please visit my website
- Please use Github issues for filing bugs.
- Please follow me on Twitter @__mrokok.
- LinkedIn Profile Mário Moiane