All Projects → SirJosh3917 → StringDB

SirJosh3917 / StringDB

Licence: MIT License
StringDB is a modular, key/value pair archival DB designed to consume *tiny* amounts of ram & produce *tiny* databases.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to StringDB

ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (+7.14%)
Mutual labels:  lightweight, small, easy-to-use
Redux Zero
A lightweight state container based on Redux
Stars: ✭ 1,977 (+3430.36%)
Mutual labels:  lightweight, small
Bootstrap Cookie Alert
A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
Stars: ✭ 165 (+194.64%)
Mutual labels:  lightweight, small
MachineLearning
An easy neural network for Java!
Stars: ✭ 125 (+123.21%)
Mutual labels:  lightweight, easy-to-use
Simple Php Router
Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
Stars: ✭ 279 (+398.21%)
Mutual labels:  lightweight, easy-to-use
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (+489.29%)
Mutual labels:  lightweight, small
Wolff
🐺 Lightweight and easy to use framework for building web apps.
Stars: ✭ 203 (+262.5%)
Mutual labels:  lightweight, small
birthday.py
🎉 A simple discord bot in discord.py that helps you understand the usage of SQL databases
Stars: ✭ 30 (-46.43%)
Mutual labels:  small, easy-to-use
QArchive
Async C++ Cross-Platform library that modernizes libarchive using Qt5 🚀. Simply extracts 7z 🍔, Tarballs 🎱 and other supported formats by libarchive. ❤️
Stars: ✭ 66 (+17.86%)
Mutual labels:  small, easy-to-use
flagpack
A lightweight flag icon toolkit for the web.
Stars: ✭ 51 (-8.93%)
Mutual labels:  lightweight, small
DuiMini
Cross-platform, lightweight DirectUI GUI framework.
Stars: ✭ 13 (-76.79%)
Mutual labels:  lightweight, easy-to-use
query2report
Query2Report is a simple open source business intelligence platform that allows users to build report/dashboard for business analytics or enterprise reporting
Stars: ✭ 43 (-23.21%)
Mutual labels:  lightweight, easy-to-use
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-73.21%)
Mutual labels:  small, easy-to-use
Machinelearning
An easy neural network for Java!
Stars: ✭ 122 (+117.86%)
Mutual labels:  lightweight, easy-to-use
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+214.29%)
Mutual labels:  lightweight, small
brute-md5
Advanced, Light Weight & Extremely Fast MD5 Cracker/Decoder/Decryptor written in Python 3
Stars: ✭ 16 (-71.43%)
Mutual labels:  lightweight, easy-to-use
docker-alpine-wkhtmltopdf
wkhtmltopdf alpine docker container with headless qt patches
Stars: ✭ 150 (+167.86%)
Mutual labels:  lightweight, small
dowels
🔨 a tiny but powerful javascript library that performs client-side routing, templating, and REST API communication to help you get your single-page web applications running in seconds
Stars: ✭ 13 (-76.79%)
Mutual labels:  small
Synapses
A group of neural-network libraries for functional and mainstream languages
Stars: ✭ 63 (+12.5%)
Mutual labels:  lightweight
tiny-framework
A light wight easy to use RESTful apis framework for education & demo purposes. stripped down framework to the fundamental components that that every one would essentially need to (learn / make a demo application).
Stars: ✭ 13 (-76.79%)
Mutual labels:  lightweight

StringDB

StringDB

Build Status Test Status Nuget Version Nuget Downloads

Install-Package StringDB

Introduction

StringDB is a key/value pair store with a friendly API to use as little RAM and space as possible.

Verify the claims for yourself:

Api

Enumerate over a database and it's values, the fastest, by enumerating over it optimally

using var db = new DatabaseBuilder()
	.UseIODatabase(StringDBVersion.Latest, "database.db", out var optimalTokenSource)
	.WithBuffer(1000)
	.WithTranform(StringTransformation.Default, StringTransformation.Default);
	
foreach (var (key, value) in db.EnumerateOptimally(optimalTokenSource))
{
	// do something with the key and value
}

Use fluent extensions to create a database:

using IDatabase<string, string> db = new DatabaseBuilder()
    .UseIODatabase(StringDBVersion.Latest, "database.db")
    .WithBuffer(1000)
    .WithTransform(StringTransformation.Default, StringTransformation.Default);

using IDatabase<int, string> memDb = new DatabaseBuilder()
    .UseMemoryDatabase<int, string>();

Use the IDatabase interface to interface with databases

void InsertGreeting(IDatabase<string, string> database, string user)
{
    database.Insert(user, $"Greetings, {user}!");
}

And inherit BaseDatabase to create your own IDatabases with minimal effort

public class TestDatabase : BaseDatabase<int, string>
{
    private class LazyValue : ILazyLoader<string>
    {
        private readonly string _value;
        public LazyValue(int value) => _value = value.ToString();
        public string Load() => _value;
        public void Dispose() {}
    }
	
	public override void Dispose() {}

    protected override void InsertRange(KeyValuePair<int, string>[] items)
    {
        foreach(var item in items)
        {
            Console.WriteLine($"{item.Key}: {item.Value}");
        }
    }

    protected override IEnumerable<KeyValuePair<int, ILazyLoader<string>>> Evaluate()
    {
        for(var i = 0; i < int.MaxValue)
        {
            yield return KeyValuePair.Create(i, new LazyValue(i));
        }
    }
}

Tiny icon_tiny

StringDB is tiny. Use tiny amounts of RAM, and tiny amounts of space.

StringDB 10.0.0 file size: single inserts, 128 byte keys, 1024 byte values

Chart

Inserts Size (in KB, 1000 bytes) Absolute Minimum Size Possible StringDB Overhead Percentage
1 1.172 KB 1.152 KB 1.706485%
50 58.208 KB 57.6 KB 1.04453%
100 116.408 KB 115.2 KB 1.037729%

This chart shows the size of a StringDB file after multiple single inserts. Every key is 128 bytes long, and every value is 1024 bytes long. By doing single inserts, file size is dramatically affected due to the additional overhead for the index chain.

StringDB 10.0.0 file size: insert range, 128 byte keys, 1024 byte values

Chart

Elements in Insert Range Size (in KB, 1000 bytes) Absolute Minimum Size Possible StringDB Overhead Percentage
1 1.172 KB 1.152 KB 1.706485%
50 57.963 KB 57.6 KB 0.626262%
100 115.913 KB 115.2 KB 0.615117%

This chart shows the size of a StringDB file after a single insert range with the amount of items specified.

Addons

Official addon support will be maintained for these libraries.

Issues welcomed!

Don't be afraid to make an issue about anything and everything!

  • Is there something weird with how databases are created? Submit an issue!
  • Is there something that you wish you could do but can't? Submit an issue!
  • Is this library not suitable for your purposes? Submit an isssue!
  • Want it to do something? Submit an issue!

It's an honour to have you use this library, and feedback is needed to make this the greatest it can be.

Need immediate assistence? Join the discord!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].