{"id":37182552,"url":"https://github.com/alexyer/ghost","last_synced_at":"2026-01-14T21:03:23.353Z","repository":{"id":57524123,"uuid":"45927176","full_name":"alexyer/ghost","owner":"alexyer","description":":ghost: Yet another in-memory key/value storage written in Go","archived":false,"fork":false,"pushed_at":"2016-02-03T18:19:18.000Z","size":1401,"stargazers_count":4,"open_issues_count":14,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T02:10:11.568Z","etag":null,"topics":["cli","database","embedded","key-value","nosql","storage"],"latest_commit_sha":null,"homepage":"","language":"Go","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/alexyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-10T17:06:52.000Z","updated_at":"2024-01-07T15:36:32.000Z","dependencies_parsed_at":"2022-09-26T18:10:55.367Z","dependency_job_id":null,"html_url":"https://github.com/alexyer/ghost","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/alexyer/ghost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexyer%2Fghost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexyer%2Fghost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexyer%2Fghost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexyer%2Fghost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexyer","download_url":"https://codeload.github.com/alexyer/ghost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexyer%2Fghost/sbom","scorecard":{"id":182825,"data":{"date":"2025-08-11","repo":{"name":"github.com/alexyer/ghost","commit":"7bcfc8b5e005cccbb61949c932c3c5949f51f080"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T19:10:52.632Z","repository_id":57524123,"created_at":"2025-08-16T19:10:52.632Z","updated_at":"2025-08-16T19:10:52.632Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","database","embedded","key-value","nosql","storage"],"created_at":"2026-01-14T21:03:22.569Z","updated_at":"2026-01-14T21:03:23.343Z","avatar_url":"https://github.com/alexyer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/alexyer/ghost.svg?branch=master)](https://travis-ci.org/alexyer/ghost)\n[![Coverage Status](https://coveralls.io/repos/alexyer/ghost/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/alexyer/ghost?branch=master)\n[![GoDoc](https://godoc.org/github.com/alexyer/ghost?status.svg)](https://godoc.org/github.com/alexyer/ghost)\n\n# Ghost\nYet another in-memory key/value storage written in Go.\n\n### Description\nSimple key/value storage.\nBased on Striped hashmap algorithm.\n\n### Features\n  * Concurrency safe\n  * Fast\n  * Written in pure Go, means could be used in any place where Go could be run\n  * Could be used as embedded storage\n  * Could be run as standalone server\n\n## Commands\n\nServer commands:\n  * PING -- Test command. Returns \"Pong!\".\n\nHash commands:\n  * SET \u0026lt;key\u0026gt; \u0026lt;value\u0026gt; -- Set create or update \u0026lt;key\u0026gt; with \u0026lt;value\u0026gt;.\n  * GET \u0026lt;key\u0026gt; -- Get value of the \u0026lt;key\u0026gt;.\n  * DEL \u0026lt;key\u0026gt; -- Delete key \u0026lt;key\u0026gt;.\n\nCollection commands:\n  * CGET \u0026lt;collection name\u0026gt; -- Change user's collection.\n  * CADD \u0026lt;collection name\u0026gt; -- Create new collection.\n\n## Server\n\n####Build server:\n```sh\nmake ghost-server\n```\n\n####Run server:\n```sh\nghost -host localhost -port 6869\n```\n### Benchmark\n####Build:\n```sh\nmake ghost-benchmark\n```\n\n```sh\nUsage of ghost-benchmark:\n  -clients int\n        Number of paralel connections (default 50)\n  -embedded\n        Test embedded storage\n  -host string\n        Server hostname (default \"localhost\")\n  -keyrange int\n        Use random keys for SET/GET (default 100)\n  -pooltimeout int\n        Client PoolTimeout option (default 10)\n  -port int\n        Server port (default 6869)\n  -requests int\n        Total number of requests (default 10000)\n  -size int\n        Data size of SET/GET value in bytes (default 2)\n  -socket string\n        Listen to unix socket\n```\n\n## Client\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/alexyer/ghost/client\"\n)\n\nfunc main() {\n    // Create new client and connect to the Ghost server.\n\tghost := client.New(\u0026client.Options{\n\t\tAddr: \"localhost:6869\",\n\t})\n\n\tghost.Set(\"key1\", \"val2\")      // Set key\n\tres, err := ghost.Get(\"key1\")  // Get key\n\tghost.Del(\"key1\")              // Del key\n\n\tghost.CAdd(\"new-collection\")  // Create new collection\n\tghost.CGet(\"new-collection\")  // Change client collection\n}\n```\n\n## CLI\nNow you can use a simple cli to test or play with data. All the current commands\nare supported. Cli works only if ghost-server exists on provided address.\n\n####Build:\n```sh\nmake ghost-cli\n```\n\n####Run cli:\n```sh\nghost-cli -host localhost -port 6869\n```\n\n#### Example session:\n```sh\n\u003e ping # will test the connection\nPong!\n\u003e set hello world # will set value \"world\" to key \"hello\"\nOK\n\u003e get hello # will get the value stored with key \"hello\"\nworld\n\u003e del hello # will delete the value stored with key \"hello\"\nOK\n\u003e cadd mars # will add new \"mars\" collection\nOK\n\u003e cget mars # will select \"mars\" collection\nOK\n\u003e set \"few words key\" \"few words value\" # if few words in value or keys is needed surround it with quotes\nOK\n\u003e get \"few words key\"\nfew words value\n\u003e set song \"riders on the storm\" # only one argument could be in quotes if needed\nOK\n\u003e get song\nriders on the storm\n\u003e set \"another song\" stairway # other order is possible\nOK\n\u003e get \"another song\"\nstairway\n# cli also supports two utility command:\n\u003e help # to get the help message\n\u003e quit # to correct way out of cli\n```\n\n## Embedded\n### Benchmark\nGhost hashmap\n\n```\nBenchmarkSet-4            \t  500000\t      4625 ns/op\nBenchmarkGet-4            \t10000000\t       101 ns/op\nBenchmarkDel-4            \t20000000\t        75.1 ns/op\n```\n\nGhost concurrent hashmap\n\n```\nBenchmarkParallelSet-4    \t  300000\t      3680 ns/op\nBenchmarkParallelSet8-4   \t  500000\t      4050 ns/op\nBenchmarkParallelSet64-4  \t  500000\t      4107 ns/op\nBenchmarkParallelSet128-4 \t  500000\t      4132 ns/op\nBenchmarkParallelSet1024-4\t  300000\t      4256 ns/op\n\nBenchmarkParallelGet-4    \t20000000\t       116 ns/op\nBenchmarkParallelGet8-4   \t20000000\t       133 ns/op\nBenchmarkParallelGet64-4  \t20000000\t       136 ns/op\nBenchmarkParallelGet128-4 \t20000000\t       142 ns/op\nBenchmarkParallelGet1024-4\t20000000\t       137 ns/op\n\nBenchmarkParallelDel-4    \t10000000\t       122 ns/op\nBenchmarkParallelDel8-4   \t10000000\t       152 ns/op\nBenchmarkParallelDel64-4  \t10000000\t       154 ns/op\nBenchmarkParallelDel128-4 \t10000000\t       154 ns/op\nBenchmarkParallelDel1024-4\t10000000\t       156 ns/op\n```\n\nNative hashmap\n\n```\nBenchmarkNativeSet-4      \t 3000000\t       338 ns/op\nBenchmarkNativeGet-4      \t30000000\t        41.3 ns/op\nBenchmarkNativeDel-4      \t100000000\t        15.5 ns/op\n```\n\n### Example\n```go\npackage main\n\nimport (\n        \"fmt\"\n\n        \"github.com/alexyer/ghost\"\n)\n\nfunc main() {\n        //Storage\n        storage := ghost.GetStorage() // Get storage instance\n\n        storage.AddCollection(\"newcollection\")          // Create new collection\n        mainCollection := storage.GetCollection(\"main\") // Get existing collection\n        storage.DelCollection(\"newcollection\")          // Delete collection\n\n        // Collections\n        mainCollection.Set(\"somekey\", \"42\") // Set item\n\n        val, _ := mainCollection.Get(\"somekey\") // Get item from Collection\n        fmt.Println(val)\n\n        mainCollection.Del(\"somekey\") // Delete item\n}\n```\n\n## TODO\n[Release Milestone](https://github.com/alexyer/ghost/milestones/Release)\n\n## Contributing\nIt's learing project, so there are possible a lot of issues, espesially in concurrent code,\nso any improvements, critics or propsals are highly appretiated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexyer%2Fghost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexyer%2Fghost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexyer%2Fghost/lists"}