{"id":13630376,"url":"https://github.com/couchbase/nitro","last_synced_at":"2025-10-07T15:22:32.300Z","repository":{"id":54784112,"uuid":"61161493","full_name":"couchbase/nitro","owner":"couchbase","description":"A high performance in-memory index storage engine","archived":false,"fork":false,"pushed_at":"2024-03-18T16:16:13.000Z","size":739,"stargazers_count":107,"open_issues_count":3,"forks_count":16,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-01T22:45:56.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/couchbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-14T22:59:26.000Z","updated_at":"2024-08-01T22:45:56.873Z","dependencies_parsed_at":"2023-02-12T20:55:11.690Z","dependency_job_id":"b44ebe4f-3962-4db4-98b6-2a31c91662e4","html_url":"https://github.com/couchbase/nitro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase%2Fnitro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase%2Fnitro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase%2Fnitro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase%2Fnitro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/couchbase","download_url":"https://codeload.github.com/couchbase/nitro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223757469,"owners_count":17197562,"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":[],"created_at":"2024-08-01T22:01:40.545Z","updated_at":"2025-10-07T15:22:27.240Z","avatar_url":"https://github.com/couchbase.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# nitro\n\nA high performance in-memory key-value item storage engine written in golang.\nThe storage engine is based lock-free data structures and scales well with\nmulticore CPUs.\n\n[![Build Status](https://travis-ci.org/couchbase/nitro.svg?branch=master)](https://travis-ci.org/couchbase/nitro)\n[![Go Report Card](https://goreportcard.com/badge/github.com/couchbase/nitro)](https://goreportcard.com/report/github.com/couchbase/nitro)\n[![GoDoc](https://godoc.org/github.com/couchbase/nitro?status.svg)](https://godoc.org/github.com/couchbase/nitro)\n\n\n### Features\n\n- Operations: insert, delete, iterator (lookup, range queries)\n- Supports multiple concurrent readers and writers which scales almost linearly\n- Database snapshots which facilitates stable and repeatable scans\n- Lock-free data structures ensures that concurrent readers and writers doesn't\n  block each other\n- The memory overhead of metadata of an item is 64 bytes\n- Fast snapshotting: Minimal overhead snapshots and they can be created frequently (eg,. every 10ms)\n- Optional memory manager based on jemalloc to avoid golang garbage collector\n  for higher performance\n- Custom key comparator\n- Fast backup and restore on disk\n\n### Example usage\n\n    // Create a nitro instance with default config\n   \tdb := nitro.New()\n\tdefer db.Close()\n\n    // Create a writer\n    // A writer should be created for every concurrent thread\n\tw := db.NewWriter()\n\tfor i := 0; i \u003c 100; i++ {\n\t\titm := []byte(fmt.Sprintf(\"item-%02d\", i))\n\t\tw.Put(itm)\n\t}\n\n    // Create an immutable snapshot\n\tsnap1, _ := db.NewSnapshot()\n\n\tfor i := 0; i \u003c 100; i++ {\n\t\tif i%2 == 0 {\n\t\t\titm := []byte(fmt.Sprintf(\"item-%02d\", i))\n\t\t\tw.Delete(itm)\n\t\t}\n\t}\n\n    // Create an immutable snapshot\n\tsnap2, _ := db.NewSnapshot()\n\n    // Create an iterator for a snapshot\n\tit1 := snap1.NewIterator()\n\tcount1 := 0\n\tfor it1.SeekFirst(); it1.Valid(); it1.Next() {\n\t\tfmt.Println(\"snap-1\", string(it1.Get()))\n\t\tcount1++\n\t}\n\n    // Close snapshot and iterator once you have finished using them\n\tit1.Close()\n\tsnap1.Close()\n\n    // Create an iterator for a snapshot\n\tit2 := snap2.NewIterator()\n\tcount2 := 0\n\tfor it2.SeekFirst(); it2.Valid(); it2.Next() {\n\t\tfmt.Println(\"snap-2\", string(it2.Get()))\n\t\tcount2++\n\t}\n\n    // Close snapshot and iterator once you have finished using them\n\tit2.Close()\n\tsnap2.Close()\n\n\tfmt.Println(count2 == count1/2)\n    \n\n### License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase%2Fnitro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcouchbase%2Fnitro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase%2Fnitro/lists"}