{"id":13440831,"url":"https://github.com/photondb/photondb","last_synced_at":"2025-03-20T10:32:54.097Z","repository":{"id":41456206,"uuid":"502268740","full_name":"photondb/photondb","owner":"photondb","description":"A high-performance storage engine for modern hardware and platforms.","archived":true,"fork":false,"pushed_at":"2023-01-09T13:17:07.000Z","size":1391,"stargazers_count":501,"open_issues_count":10,"forks_count":31,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-04-25T23:20:59.553Z","etag":null,"topics":["database","rust","storage-engine"],"latest_commit_sha":null,"homepage":"https://photondb.github.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/photondb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-11T06:24:35.000Z","updated_at":"2024-04-18T02:00:06.000Z","dependencies_parsed_at":"2023-02-08T12:00:28.244Z","dependency_job_id":null,"html_url":"https://github.com/photondb/photondb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photondb%2Fphotondb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photondb%2Fphotondb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photondb%2Fphotondb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photondb%2Fphotondb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/photondb","download_url":"https://codeload.github.com/photondb/photondb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213299364,"owners_count":15566610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","rust","storage-engine"],"created_at":"2024-07-31T03:01:26.781Z","updated_at":"2025-03-20T10:32:54.090Z","avatar_url":"https://github.com/photondb.png","language":"Rust","funding_links":[],"categories":["HarmonyOS","Rust","rust"],"sub_categories":["Windows Manager"],"readme":"# PhotonDB\n\n[![crates][crates-badge]][crates-url]\n[![docs][docs-badge]][docs-url]\n\n[crates-badge]: https://img.shields.io/crates/v/photondb?style=flat-square\n[crates-url]: https://crates.io/crates/photondb\n[docs-badge]: https://img.shields.io/docsrs/photondb?style=flat-square\n[docs-url]: https://docs.rs/photondb/latest/photondb\n\nA high-performance storage engine for modern hardware and platforms.\n\nPhotonDB is designed from scratch to leverage the power of modern multi-core chips, storage devices, operating systems, and programming languages.\n\nFeatures:\n\n- Latch-free data structures, scale to many cores.\n- Log-structured persistent stores, optimized for flash storage.\n- Asynchronous APIs and efficient file IO, powered by io_uring on Linux.\n\n## Design\n\n![Architecture](doc/media/architecture.drawio.svg)\n\n## Progress\n\nWe have published the `photondb` crate v0.0.4. You can try some examples to see what it can do so far. It is important to note that the current version is still too young to be used for anything serious.\n\nUse the synchronous APIs:\n\n```toml\n[dependencies]\nphotondb = \"0.0.4\"\n```\n\n```rust\nuse photondb::{std::Table, Result, TableOptions};\n\nfn main() -\u003e Result\u003c()\u003e {\n    let table = Table::open(\"/tmp/photondb\", TableOptions::default())?;\n    let key = vec![1];\n    let val1 = vec![2];\n    let val2 = vec![3];\n    // Simple CRUD operations.\n    table.put(\u0026key, 1, \u0026val1)?;\n    table.delete(\u0026key, 2)?;\n    table.put(\u0026key, 3, \u0026val2)?;\n    assert_eq!(table.get(\u0026key, 1)?, Some(val1));\n    assert_eq!(table.get(\u0026key, 2)?, None);\n    assert_eq!(table.get(\u0026key, 3)?, Some(val2.clone()));\n    let guard = table.pin();\n    // Get the value without copy.\n    assert_eq!(guard.get(\u0026key, 3)?, Some(val2.as_slice()));\n    // Iterate the tree page by page.\n    let mut pages = guard.pages();\n    while let Some(page) = pages.next()? {\n        for (k, v) in page {\n            println!(\"{:?} {:?}\", k, v);\n        }\n    }\n    Ok(())\n}\n```\n\nUse the asynchronous APIs:\n\n```toml\n[dependencies]\nphotondb = \"0.0.4\"\nphotonio = \"0.0.5\"\n```\n\n```rust\nuse photondb::{Result, Table, TableOptions};\n\n#[photonio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let table = Table::open(\"/tmp/photondb\", TableOptions::default()).await?;\n    let key = vec![1];\n    let val1 = vec![2];\n    let val2 = vec![3];\n    // Simple CRUD operations.\n    table.put(\u0026key, 1, \u0026val1).await?;\n    table.delete(\u0026key, 2).await?;\n    table.put(\u0026key, 3, \u0026val2).await?;\n    assert_eq!(table.get(\u0026key, 1).await?, Some(val1.clone()));\n    assert_eq!(table.get(\u0026key, 2).await?, None);\n    assert_eq!(table.get(\u0026key, 3).await?, Some(val2.clone()));\n    let guard = table.pin();\n    // Get the value without copy.\n    assert_eq!(guard.get(\u0026key, 3).await?, Some(val2.as_slice()));\n    // Iterate the tree page by page.\n    let mut pages = guard.pages();\n    while let Some(page) = pages.next().await? {\n        for (k, v) in page {\n            println!(\"{:?} {:?}\", k, v);\n        }\n    }\n    Ok(())\n}\n```\n\nRun the example with:\n\n```\ncargo +nightly-2022-10-01 run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotondb%2Fphotondb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphotondb%2Fphotondb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotondb%2Fphotondb/lists"}