{"id":15293276,"url":"https://github.com/samuelbankstech/systemicdb-core","last_synced_at":"2026-01-12T02:57:11.136Z","repository":{"id":64729403,"uuid":"577734452","full_name":"SamuelBanksTech/SystemicDB-Core","owner":"SamuelBanksTech","description":"This is the core SystemicDB package that is used in the SystemicDB Server, it can be used standalone in a Go project","archived":false,"fork":false,"pushed_at":"2022-12-13T15:51:32.000Z","size":242,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T01:35:27.513Z","etag":null,"topics":["database","in-memory-database"],"latest_commit_sha":null,"homepage":"https://systemicdb.com","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/SamuelBanksTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-12-13T12:05:31.000Z","updated_at":"2022-12-14T09:32:26.000Z","dependencies_parsed_at":"2022-12-15T03:36:16.311Z","dependency_job_id":null,"html_url":"https://github.com/SamuelBanksTech/SystemicDB-Core","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelBanksTech%2FSystemicDB-Core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelBanksTech%2FSystemicDB-Core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelBanksTech%2FSystemicDB-Core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelBanksTech%2FSystemicDB-Core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelBanksTech","download_url":"https://codeload.github.com/SamuelBanksTech/SystemicDB-Core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245284436,"owners_count":20590306,"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","in-memory-database"],"created_at":"2024-09-30T16:45:20.300Z","updated_at":"2025-03-24T13:44:33.288Z","avatar_url":"https://github.com/SamuelBanksTech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"background: black\"\u003e\n\u003cimg height=\"300\" src=\"./res/logo-transparent.webp\" alt=\"SystemicDB Logo\" /\u003e\n\n[![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](http://golang.org)\n[![Go Report Card](https://goreportcard.com/badge/github.com/SamuelBanksTech/SystemicDB-Core)](https://goreportcard.com/report/github.com/SamuelBanksTech/SystemicDB-Core)\n[![Twitter Handle](https://img.shields.io/twitter/follow/samuelbankstech)](https://twitter.com/samuelbankstech)\n\n\u003c/div\u003e\n\n\n# SystemicDB - Core\n\n### Introduction\n\nThis is the core SystemicDB package that is used in the full SystemicDB Server application. I can be imported and used in any Go application for standalone usage or one could wrap their own server around package for custom usage.\n\n### Install\n\n```bash \ngo get github.com/SamuelBanksTech/SystemicDB-Core\n```\n\n### Usage\n\nFirst of all you will need to instantiate the core SystemicDB struct.\n\n```go\nsdb := NewSystemicDB()\n```\n\nInsert: Takes a string key, a byte slice as its data, and a expiry time  \nThis function will initiate a database optimisation function (AVL Tree Balancing)\n\n```go\nsdb.Insert(\"my-key\", []byte(\"This is my byte data\"), 15 * time.Minute)\n```\n\nExists: Simply returns a bool value to denote whether that key exists or not \n\n```go\nsdb.Exists(\"my-key\")\n```\n\nGet: Take a key as a string and retrieves a struct containing the nodes data\n\n```go\nsdb.Get(\"my-key\")\n\n//Returns...\ntype NodeData struct {\n    Key    string\n    Value  []byte\n    Expiry int64 //This is a unix timestamp of the exact time it will expire and bew removed from the database\n}\n```\n\nRemove: Takes a key as a string, removes the node and all the associated data  \nThis function will initiate a database optimisation function (AVL Tree Balancing)\n\n```go\nsdb.Remove(\"my-key\")\n```\n\n### TODO\n\n- ❇️ Implement a tag map to allow grouping of keys\n  - Implement batch operations by tag (Remove By Tag for example)\n- ❇️ Produce benchmarks comparison tables (although I already know it's faster than most)\n- ❇️ Implement some overrides in struct init that will allow custom timings for Garbage Collection etc","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelbankstech%2Fsystemicdb-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelbankstech%2Fsystemicdb-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelbankstech%2Fsystemicdb-core/lists"}