A native stateless cache implementation.

Overview

GitHub top language GitHub issues GitHub pull requests

fBNC

fBNC, Blockchain Native Cache.

A native stateless storage library for block chain.

Its value is to improve the stability and security of online services, at the cost of some single-node performance losses.

Code Structure

# zsh % tree -F src

src
├── helper.rs
├── lib.rs
├── mapx/
│   ├── backend.rs
│   ├── mod.rs
│   └── test.rs
├── serde.rs
└── vecx/
    ├── backend.rs
    ├── mod.rs
    └── test.rs

2 directories, 9 files
# zsh % tokei

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Makefile                1           29           21            0            8
 TOML                    2           37           29            3            5
-------------------------------------------------------------------------------
 Markdown                1           17            0           10            7
 |- Shell                1           34           29            2            3
 (Total)                             51           29           12           10
-------------------------------------------------------------------------------
 Rust                   12         1729         1406           84          239
 |- Markdown            11          129            0          121            8
 (Total)                           1858         1406          205          247
===============================================================================
 Total                  16         1812         1456           97          259
===============================================================================
You might also like...
Turn your discord cache back to viewable images.

discache 🦀 Every time you view an Image in Discord, it gets saved in your cache folder as an unviewable file. Discache allows you to convert those fi

Non-volatile, distributed file cache backed by content-addressed storage

blobnet A low-latency file server that responds to requests for chunks of file data. This acts as a non-volatile, over-the-network content cache. Inte

Rust type wrapper to cache hash of potentially large structures.

CachedHash For a type T, CachedHashT wraps T and implements Hash in a way that caches T's hash value. This is useful when T is expensive to hash (fo

Key-value cache RESP server with support for key expirations ⌛

BADER-DB (بادِر) Key-value cache RESP server with support for key expirations ⌛ Supported Features • Getting Started • Basic Usage • Cache Eviction •

Rust binary memcached implementation

bmemcached-rs Rust binary memcached implementation (ON GOING) Usage extern crate bmemcached; use std::sync::Arc; use std::thread; use bmemcached::Me

This is a Rust implementation for popular caches (support no_std).

Caches This is a Rust implementation for popular caches (support no_std). See Introduction, Installation and Usages for more details. English | 简体中文 I

A flexible, stateless implementation of the bisection method

Flexibility is achieved by giving the user of this crate control over the input and output types

rust-native-tls — Bindings for native TLS libraries

rust-native-tls Documentation An abstraction over platform-specific TLS implementations. Specifically, this crate uses SChannel on Windows (via the sc

weggli-native a "native" C API for Google's weggli

weggli-native a "native" C API for Google's weggli

TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

This is a Rust implementation for HashiCorp's golang-lru. This crate contains three LRU based cache, LRUCache, TwoQueueCache and AdaptiveCache.

This is a Rust implementation for HashiCorp's golang-lru. This crate contains three LRU based cache, LRUCache, TwoQueueCache and AdaptiveCache.

Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

A generational arena based LRU Cache implementation in 100% safe rust.

generational-lru Crate providing a 100% safe, generational arena based LRU cache implementation. use generational_lru::lrucache::{LRUCache, CacheError

Rust cache structures and easy function memoization

cached Caching structures and simplified function memoization cached provides implementations of several caching structures as well as a handy macro f

Thread Safe Cache with async loader functions based on tokio-rs

cache-loader-async crates.io The goal of this crate is to provide a thread-safe and easy way to access any data structure which might is stored in a d

A CLI for extracting libraries from Apple's dyld shared cache file

dyld-shared-cache-extractor As of macOS Big Sur, instead of shipping the system libraries with macOS, Apple ships a generated cache of all built in dy

An object-relational in-memory cache, supports queries with an SQL-like query language.

qlcache An object-relational in-memory cache, supports queries with an SQL-like query language. Warning This is a rather low-level library, and only p

This plugin provides an interface for storing unencrypted values on the application cache folder.

Tauri Plugin Store This plugin provides an interface for storing unencrypted values on the application cache folder. Architecture This repo shape migh

Key-Value based in-memory cache library which supports Custom Expiration Policies

Endorphin Key-Value based in-memory cache library which supports Custom Expiration Policies with standard HashMap, HashSet interface. use endorphin::H

Comments
  • vsdb: BNC next generation

    vsdb: BNC next generation

    VSDB (BNC next generation)

    https://crates.io/crates/vsdb

    VSDB is a 'Git' in the form of a KV database.

    Based on the powerful version control function of VSDB, you can easily give your data structure the ability to version management.

    Make everything versioned !!

    Highlights

    • Support Git-like verison operations, such as:
      • Create countless branches and merge them to their parents
      • Rolling back a 'branch' to a specified historical 'version'
      • Querying the historical value of a key on the specified 'branch'
    • Most APIs is similar as the coresponding data structures in the standard library
      • Use Vecx just like Vec
      • Use Mapx just like HashMap
      • Use MapxOrd just like BTreeMap
    • ...

    Examples

    Suppose you have a great algorithm like this:

    struct GreatAlgo {
        a: Vec<...>,
        b: BTreeMap<...>,
        c: u128,
        d: HashMap<...>,
        e: ...
    }
    

    Simply replace the original structure with the corresponding VSDB data structure, and your algorithm get the powerful version control ability at once!

    struct GreatAlgo {
        a: VecxVs<...>,
        b: MapxOrdVs<...>,
        c: OrphanVs<u128>,
        d: MapxVs<...>,
        e: ...
    }
    
    impl GreatAlgo {
        fn version_create(&self, name: &str) {
            self.a.version_create(VersionName(name)).unwrap();
            self.b.version_create(VersionName(name)).unwrap();
            self.c.version_create(VersionName(name)).unwrap();
            self.d.version_create(VersionName(name)).unwrap();
            ...
        }
        fn branch_create(&self, name: &str) {
            self.a.branch_create(BranchName(name)).unwrap();
            self.b.branch_create(BranchName(name)).unwrap();
            self.c.branch_create(BranchName(name)).unwrap();
            self.d.branch_create(BranchName(name)).unwrap();
            ...
        }
        ...
    }
    

    Some complete examples:

    Compilation features

    • [default] sled_engine, use sled as the backend database
      • Faster compilation speed
      • Support for compiling into a statically linked binary
    • rocks_engine, use rocksdb as the backedn database
      • Faster running speed
      • Can not be compiled into a statically linked binary
    • [default] cbor_ende, use cbor as the en/decoder
      • Faster running speed
    • bcs_ende, use bcs as the en/decoder
      • Created by the libre project of Facebook
      • Security reinforcement for blockchain scenarios

    Low-level design

    Based on the underlying one-dimensional linear storage structure (native kv-database, such as sled/rocksdb, etc.), multiple different namespaces are divided, and then abstract each dimension in the multi-dimensional logical structure based on these divided namespaces.

    In the category of kv-database, namespaces can be expressed as different key ranges, or different key prefix.

    This is the same as expressing complex data structures in computer memory(the memory itself is just a one-dimensional linear structure).

    User data will be divided into two dimensions: 'branch' and 'version', the functions of the 'basic' category are stateless, and the functions of the 'versioned' category are stateful. In the internal implementation, each stateful function is implemented based on its corresponding stateless function, all stateful data has two additional identification dimensions ('branch' and 'version'), somewhat like the logic in Git. Stateless functions do not have the feature of 'version' management, but they have higher performance.

    enhancement 
    opened by ccmlm 0
Owner
Findora Foundation
Findora Foundation
Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

Al Liu 310 Dec 29, 2022
A generational arena based LRU Cache implementation in 100% safe rust.

generational-lru Crate providing a 100% safe, generational arena based LRU cache implementation. use generational_lru::lrucache::{LRUCache, CacheError

Arindam Das 37 Dec 21, 2022
Rust cache structures and easy function memoization

cached Caching structures and simplified function memoization cached provides implementations of several caching structures as well as a handy macro f

James Kominick 996 Jan 7, 2023
Key-Value based in-memory cache library which supports Custom Expiration Policies

Endorphin Key-Value based in-memory cache library which supports Custom Expiration Policies with standard HashMap, HashSet interface. use endorphin::H

Jun Ryung Ju 15 Oct 1, 2022
A general-purpose distributed memory cache system compatible with Memcached

memcrsd memcached server implementation in Rust memcrsd is a key value store implementation in Rust. It is compatible with binary protocol of memcache

null 274 Dec 14, 2022
A lightweight key-value cache system developed for experimental purposes

A lightweight key-value cache system developed for experimental purposes. It can also include distributed systems setup if I can.

Burak Selim Senyurt 8 Jul 23, 2022
ConstDB - an in-memory cache store which aims at master-master replications

A redis-like cache store that implements CRDTs and active-active replications.

null 27 Aug 15, 2022
A set of safe Least Recently Used (LRU) map/cache types for Rust

LruMap A set of safe Least-Recently-Used (LRU) cache types aimed at providing flexible map-like structures that automatically evict the least recently

Khonsu Labs 4 Sep 24, 2022
Read-optimized cache of Cardano on-chain entities

Read-optimized cache of Cardano on-chain entities Intro Scrolls is a tool for building and maintaining read-optimized collections of Cardano's on-chai

TxPipe 58 Dec 2, 2022
A read-only, memory-mapped cache.

mmap-cache A low-level API for a memory-mapped cache of a read-only key-value store. Design The [Cache] index is an [fst::Map], which maps from arbitr

Duncan 3 Jun 28, 2022