{"id":21058684,"url":"https://github.com/squadrick/summarydb","last_synced_at":"2025-07-24T22:12:16.083Z","repository":{"id":81469064,"uuid":"293601033","full_name":"Squadrick/summarydb","owner":"Squadrick","description":"Approximate time-series database using sliding window aggregation","archived":false,"fork":false,"pushed_at":"2023-02-08T06:44:39.000Z","size":200,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T00:42:00.696Z","etag":null,"topics":["database","go","time-series","timeseries","timeseries-database","window-aggregation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Squadrick.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-07T18:17:58.000Z","updated_at":"2025-01-19T23:32:38.000Z","dependencies_parsed_at":"2023-03-29T19:47:43.480Z","dependency_job_id":null,"html_url":"https://github.com/Squadrick/summarydb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Squadrick/summarydb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squadrick%2Fsummarydb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squadrick%2Fsummarydb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squadrick%2Fsummarydb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squadrick%2Fsummarydb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Squadrick","download_url":"https://codeload.github.com/Squadrick/summarydb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squadrick%2Fsummarydb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266910570,"owners_count":24004917,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["database","go","time-series","timeseries","timeseries-database","window-aggregation"],"created_at":"2024-11-19T17:08:50.026Z","updated_at":"2025-07-24T22:12:16.074Z","avatar_url":"https://github.com/Squadrick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n _____                                           ____________ \n/  ___|                                          |  _  \\ ___ \\\n\\ `--. _   _ _ __ ___  _ __ ___   __ _ _ __ _   _| | | | |_/ /\n `--. \\ | | | '_ ` _ \\| '_ ` _ \\ / _` | '__| | | | | | | ___ \\\n/\\__/ / |_| | | | | | | | | | | | (_| | |  | |_| | |/ /| |_/ /\n\\____/ \\__,_|_| |_| |_|_| |_| |_|\\__,_|_|   \\__, |___/ \\____/ \n                                             __/ |            \n                                            |___/             \n```                                            \n![Go](https://github.com/Squadrick/summarydb/workflows/Go/badge.svg?branch=master)\n\nThis is an implementation of [SummaryStore](http://pages.cs.wisc.edu/~nitina/Publications/summarystore-sosp17.pdf)\nin Golang.\n\nBy using window sliding aggregations, SummaryDB achieves much lower disk usage\nand lower time-based range query latencies compared to other TSDBs. These\nbenefits come at the cost of higher error bounds of the query results.\n\nSummaryDB is best suited for high volumes of numerical data, and it currently\nallows for querying of the following metrics across time:\n1. Max\n2. Min\n3. Count\n4. Sum\n\nOn generic data, it supports:\n1. Membership (using bloom filters)\n\n---\n\n### Example\n\n```go\n\npackage main\n\nimport (\n    \"context\"\n    \"summarydb\"\n)\n\nfunc main() {\n    db := summarydb.New(\"/path/to/db\")\n    // OR\n    db := summarydb.Open(\"/path/to/db\")\n    defer db.Close()\n\n    seq := summarydb.window.ExponentialLengthsSequence(2)\n    stream := db.NewStream([]string{\"sum\", \"max\"}, seq).Run()\n\n    stream.Append(0, 10.0)\n    stream.Append(1, 11.0)\n    stream.Append(2, 12.0)\n    stream.Append(3, 13.0)\n    stream.Append(4, 14.0)\n\n    // Get sum between t=1 and t=3\n    params := QueryParams{\n        ConfidenceLevel: 0.95,\n        SDMultiplier:    1.0,\n    }\n    aggResult := stream.Query(\"sum\", 1, 3, \u0026params)\n    result := aggResult.value.Sum.Value\n    error := aggResult.error\n}\n```\n\n---\n\n### Dependencies\n\n1. [BadgerDB](https://github.com/dgraph-io/badger) is the persistent key-value\nstore.\n2. [Ristretto](https://github.com/dgraph-io/ristretto) is the cache for the\nbacking disk storage.\n3. [Cap'n Proto](https://capnproto.org/) is the serialization format for\non-disk representation for all the window data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquadrick%2Fsummarydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquadrick%2Fsummarydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquadrick%2Fsummarydb/lists"}