{"id":42486167,"url":"https://github.com/darrylwest/spot-cache","last_synced_at":"2026-01-28T11:28:33.654Z","repository":{"id":57528043,"uuid":"84674164","full_name":"darrylwest/spot-cache","owner":"darrylwest","description":"A fast targeted application cache backed by boltdb, leveldb or Rethinkdb ","archived":false,"fork":false,"pushed_at":"2019-04-21T14:02:31.000Z","size":159,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T15:48:37.830Z","etag":null,"topics":["boltdb","cache-storage","golang-application","leveldb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darrylwest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-11T19:20:39.000Z","updated_at":"2018-05-28T15:26:54.000Z","dependencies_parsed_at":"2022-09-03T22:20:29.610Z","dependency_job_id":null,"html_url":"https://github.com/darrylwest/spot-cache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/darrylwest/spot-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylwest%2Fspot-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylwest%2Fspot-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylwest%2Fspot-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylwest%2Fspot-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrylwest","download_url":"https://codeload.github.com/darrylwest/spot-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrylwest%2Fspot-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: 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":["boltdb","cache-storage","golang-application","leveldb"],"created_at":"2026-01-28T11:28:33.600Z","updated_at":"2026-01-28T11:28:33.649Z","avatar_url":"https://github.com/darrylwest.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spot Cache\n\n```\n                       _____                          ______       \n ________________________  /_      ____________ _________  /______ \n ___  ___/__  __ \\  __ \\  __/_______  ___/  __ `/  ___/_  __ \\  _ \\\n __(__  )__  /_/ / /_/ / /_ _/_____/ /__ / /_/ // /__ _  / / /  __/\n  /____/ _  .___/\\____/\\__/        \\___/ \\__,_/ \\___/ /_/ /_/\\___/ \n         /_/                                                       \n```\n\n_A lightning fast, light-weight cache service written in golang and backed by Boltdb._\n\n[![build](https://travis-ci.org/darrylwest/spot-cache.svg?branch=master)](https://travis-ci.org/darrylwest/spot-cache/)\n[![reportcard](https://goreportcard.com/badge/github.com/darrylwest/spot-cache)](https://goreportcard.com/report/github.com/darrylwest/spot-cache)\n\n# Overview\n\nSpot cache is a fast, highly available cache service written in golang with backing from various key/value stores like Boltdb, Badger, level-db, RethinkDb, etc.  Server connections are via TCP sockets with cluster/replication to support multiple machines.  It can also be used as a single instance in a small network of machines.\n\n_Currently Boltdb is the only backing data store._\n\nSocket protocol is asynchronous request/replay that uses a thin envelope to match the correct response to it's request.\n\n## Installation\n\n**Note: this project is in the early stages and doesn't expect to go live until the middle of Q3-2018.**\n\n## Server\n\n### Highlights\n\n* [boltdb](https://github.com/boltdb/bolt) backed\n* socket API (request/response)\n* cluster/replication support\n* written in golang\n* asynchronous request/response (zeromq inspired)\n* Dockerfile to enable containerization\n* lightweight enough to support a small cluster inside a single container\n\n### Cluster Configuration\n\nClusters of 3/5/7 where a quorum is required to respond to writes.  \n\n_TBD_ \n\n## Client Implementations\n\n* golang - in progress\n* nodejs - planned\n* python - planned\n\n### Go Client CLI\n\nThe client application is designed to be primarily used as a module included in an application but there is a stand-alone client app (_spotclient_) that can be used in CLI mode.\n\nUse:\n\n```bash\nspotcache-cli ping|get key|set key value|has key|delete key|status|backup file [options]\n\n```\n \n_What, no REPL?_\n\n## Examples\n\n_coming soon..._\n\n## Unit / Integration / Benchmark Tests\n\nUnit tests are in the test folder.  Run them with 'make test'.  Integration tests exercise the available clients by generating random data to store and retrieve.  Stress tests are written in go and provide data for the benchmarks below (TBD)...\n\n## API\n\n### Command Operations\n\n| func     | params     | response         | description |\n|----------|------------|------------------|-------------|\n| get      | key        | data, err        | get the data for a given key |\n| put      | key, value | err              | put data for a key |\n| del      | key        | err              | delete data for a key |\n| has      | key        | t/f, err         | return true if key exists\n| batch    | key, value | data, err        | create/execute a batch of ops |\n| expire   | key, seconds | err  | set the expiration in seconds |\n| ttl      | key   | seconds, err  | return the expiration in seconds |\n| subscribe | name | | subscribe to a channel |\n| unsubscribe | name | | unsubscribe from a channel |\n| publish  | name, message | | publish to a channel |\n| keys     | query      | data, err | return a set of keys |\n| backup   |            | err  | do a snap backup of the current database |\n| clear    |            | err  | clear all data from the database |\n| ping     |            | pong | send a pong response |\n| status   |            | data | return the status of the cache |\n| shutdown |            | err  | shutdown the cache service |\n\n\n### Socket Message Data\n\n#### Request Message Format\n\nThe socket channel is binary based using little endian.  For go-lang the encoding/binary package provides an easy way to create a custom client.  \n\nThe message format is as follows:\n\n| description | bytes | examples | comments\n|-------------|------|-----|---|\n| id   | 26 | 01BB20AAGCDCW60MZZNP7F7T8H | a [standard ulid](https://github.com/alizain/ulid) works best\n| session | 12 | bbeof787vpkw | session id granted by server (nano seconds at base 36)\n| op   | 1  | see op codes | op codes for put, get, del, etc.\n| meta size | 2 | 0, 32, 128 | the size of any meta data (can be zero), expire, hmac, etc.\n| key size | 2 | 32, 128 | the size in bytes of the data key\n| data size | 4 | 256, 64,000 | the size in bytes of the data value (can be zero)\n| meta data | n | expire:60 | any meta data, e.g., expire, hmac, app-key, etc\n| data key  | n | mykey:2344 | specified by the key size\n| data value | n | my value for this key | \n\n#### Response Message Format\n\n| description | bytes | examples | comments\n|-------------|------|-----|---|\n| id   | 26 | 01BB20AAGCDCW60MZZNP7F7T8H | the request's id\n| session | 12 | bbeof787vpkw | the request's session id\n| op   | 1  | see op codes | the request's op code |\n| meta size | 2 | any returned meta data |\n| data size | 4 | response data size |\n| meta data | n | |\n| data value | n | the response data |\n\n## Contributors\n\n_This project is actively seeking contributors for testing, client implementations, etc._\n\nHere are the rules:\n\n* RainCitySoftware develops all software using TDD.  All submitted code must include a complete set of unit tests, and if appropriate, functional tests.\n* We follow golang's idioms and best practices.  All code must be formatted using go-fmt.\n* Please submit pull requests. After code reviews and possible modifications your code will be merged.\n* Code of conduct: The ACM's [Code of Ethics and Professional Conduct](https://www.acm.org/about-acm/acm-code-of-ethics-and-professional-conduct) says it all--don't be a dick.\n\n\n## License\n\nApache 2.0\n\n###### Copyright © 2014-2018, Rain City Software | darryl.west | Version 0.91.120\n:q","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrylwest%2Fspot-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrylwest%2Fspot-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrylwest%2Fspot-cache/lists"}