No description
Find a file
2025-12-18 10:28:13 +01:00
assets Change to a smaller icon 2025-06-25 09:04:12 +02:00
examples/c Extended lib and c example 2025-06-27 11:34:28 +02:00
src Extended lib and c example 2025-06-27 11:34:28 +02:00
.envrc batman 2025-06-22 16:16:25 +02:00
.gitignore batman 2025-06-22 16:16:25 +02:00
build.zig Extended lib and c example 2025-06-27 11:34:28 +02:00
build.zig.zon Remove comments 2025-06-23 08:12:09 +02:00
flake.lock batman 2025-06-22 16:16:25 +02:00
flake.nix Started with SharedLib and C Example 2025-06-27 10:46:45 +02:00
README.md Add brainmade bagde 2025-12-18 10:28:13 +01:00

smore - Memory Store

brainmade.org

smore is a blazingly fast in-memory key value cache. It works via a custom protocol and a lot of hopes and dreams. All keys are valid ASCII strings and values are just streams of bytes.

Features

Written in Zig, this in-memory Cache is blazingly fast. It publishes a Client implementation as a Zig-Module, as well as a shared library with C-bindings to be used in any other programming language, that can handle C. It uses a custom binary protocol, which is defined in src/protocol/.

In the examples/ directory, there will be example implementations using the C-bindings in other languages. If your favourite language is missing, feel free to contribute!

The protocol currently supports only very basic operations:

  • PING
  • STORE
  • LOAD

the keys for the store are all 8 bytes long, even if the actually used bytes of the key are less. The rest will be filled with zeros.

The Data can be at most 1024 - 1 - 8 - 2 = 1013 bytes long, where the actual length is transmitted in the respective packets. The maximum length is made up from a packet size of 1024 minus the header, key and data length fields.

Why UDP

Honestly, because i felt like it.

"Actual" reasons:

  • This is a cache, the worst that can happen on a dropped packet is a recalculation of the value. This Service should not be used as an actual data-storage
  • Faster, Simpler and more lightweight than TCP

Notes/Ideas for development

  • Main implementation in Zig, server and client

  • client implementation as a library

  • try out with UDP

  • Make an alternative implementation using TCP and benchmark performance

  • simulation testing for cases of misordered, dropped UDP Packets