https://github.com/slatedb/slatedb Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} slatedb / slatedb Public * Notifications You must be signed in to change notification settings * Fork 1 * Star 101 A cloud native embedded storage engine built on object storage. slatedb.io License Apache-2.0 license 101 stars 1 fork Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 24 * Pull requests 1 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights slatedb/slatedb This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 105 Commits .github/workflows .github/workflows docs docs schemas schemas src src .gitignore .gitignore CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTING.md Cargo.lock Cargo.lock Cargo.toml Cargo.toml LICENSE LICENSE MAINTAINERS.md MAINTAINERS.md README.md README.md SECURITY.md SECURITY.md View all files Repository files navigation * README * Code of conduct * Apache-2.0 license * Security SlateDB Crates.io Version GitHub License slatedb.io Discord Introduction SlateDB is an embedded storage engine built as a log-structured merge-tree. Unlike traditional LSM-tree storage engines, SlateDB writes data to object storage (S3, GCS, ABS, MinIO, Tigris, and so on). Leveraging object storage allows SlateDB to provide bottomless storage capacity, high durability, and easy replication. The trade-off is that object storage has a higher latency and higher API cost than local disk. To mitigate high write API costs (PUTs), SlateDB batches writes. Rather than writing every put() call to object storage, MemTables are flushed periodically to object storage as a string-sorted table (SST). The flush interval is configurable. To mitigate write latency, SlateDB provides an async put method. Clients that prefer strong durability can await on put until the MemTable is flushed to object storage (trading latency for durability). Clients that prefer lower latency can simply ignore the future returned by put. To mitigate read latency and read API costs (GETs), SlateDB will use standard LSM-tree caching techniques: in-memory block caches, compression, bloom filters, and local SST disk caches. Checkout slatedb.io to learn more. Get Started Add the following to your Cargo.toml to use SlateDB: [dependencies] slatedb = "*" Then you can use SlateDB in your Rust code: use bytes::Bytes; use object_store::{ObjectStore, memory::InMemory, path::Path}; use slatedb::db:Db; use slatedb::config::{CompactorOptions, DbOptions}; use std::{sync::Arc, time::Duration}; #[tokio::main] async fn main() { // Setup let object_store: Arc = Arc::new(InMemory::new()); let options = DbOptions { flush_ms: 100, manifest_poll_interval: Duration::from_millis(100), min_filter_keys: 10, l0_sst_size_bytes: 128, compactor_options: Some(CompactorOptions::default()), }; let kv_store = Db::open( Path::from("/tmp/test_kv_store"), options, object_store, ) .await .unwrap(); // Put let key = b"test_key"; let value = b"test_value"; kv_store.put(key, value).await; // Get assert_eq!( kv_store.get(key).await.unwrap(), Some(Bytes::from_static(value)) ); // Delete kv_store.delete(key).await; assert!(kv_store.get(key).await.unwrap().is_none()); // Close kv_store.close().await.unwrap(); } SlateDB uses the object_store crate to interact with object storage, and therefore supports any object storage that implements the ObjectStore trait. Documentation Visit slatedb.io to learn more. Features SlateDB is currently in the early stages of development. It is not yet ready for production use. * [*] Basic API (get, put, delete) * [*] SSTs on object storage * [ ] Range queries (#8) * [ ] Block cache (#15) * [ ] Disk cache (#9) * [ ] Compression (#10) * [*] Bloom filters (#11) * [*] Manifest persistence (#14) * [*] Compaction (#7) * [ ] Transactions License SlateDB is licensed under the Apache License, Version 2.0. About A cloud native embedded storage engine built on object storage. slatedb.io Topics rust rocksdb database storage-engine embedded-database object-storage lsm-tree Resources Readme License Apache-2.0 license Code of conduct Code of conduct Security policy Security policy Activity Custom properties Stars 101 stars Watchers 12 watching Forks 1 fork Report repository Releases 2 v0.1.1 Latest Aug 14, 2024 + 1 release Contributors 4 * @criccomini criccomini Chris Riccomini * @rodesai rodesai Rohan * @paulgb paulgb Paul Butler * @vigneshc vigneshc Vignesh Chandramohan Languages * Rust 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.