All Projects → warrenfalk → Rocksdb Sharp

warrenfalk / Rocksdb Sharp

Licence: other
.net bindings for the rocksdb by facebook

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Rocksdb Sharp

Json Ld.net
A JSON-LD processor for .NET.
Stars: ✭ 171 (-1.16%)
Mutual labels:  dotnet-core, dotnetcore
Dotnet Etcd
A C# .NET (dotnet) GRPC client for etcd v3 +
Stars: ✭ 157 (-9.25%)
Mutual labels:  dotnet-core, dotnetcore
Data
Fast DB-independent DAL for .NET Core: abstract queries, SQL commands builder, schema-less data access, POCO mapping (micro-ORM).
Stars: ✭ 150 (-13.29%)
Mutual labels:  database, dotnetcore
Coravel
Near-zero config .NET Core micro-framework that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
Stars: ✭ 1,989 (+1049.71%)
Mutual labels:  dotnetcore, dotnet-core
Coreclr
CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes.
Stars: ✭ 12,610 (+7189.02%)
Mutual labels:  dotnet-core, dotnetcore
Dotnetcore
.NET 5 Nuget Packages.
Stars: ✭ 146 (-15.61%)
Mutual labels:  dotnet-core, dotnetcore
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+1047.98%)
Mutual labels:  dotnet-core, dotnetcore
Wopihost
ASP.NET Core MVC implementation of the WOPI protocol. Enables integration with WOPI clients such as Office Online Server.
Stars: ✭ 132 (-23.7%)
Mutual labels:  dotnet-core, dotnetcore
Storedprocedureefcore
Entity Framework Core extension to execute stored procedures
Stars: ✭ 164 (-5.2%)
Mutual labels:  dotnet-core, dotnetcore
Dotnet Retire
Open source vulnerability scanner for .NET Core projects
Stars: ✭ 161 (-6.94%)
Mutual labels:  dotnet-core, dotnetcore
Entityframeworkcore.cacheable
EntityFrameworkCore second level cache
Stars: ✭ 138 (-20.23%)
Mutual labels:  database, dotnet-core
Ilspy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
Stars: ✭ 14,011 (+7998.84%)
Mutual labels:  dotnetcore, mono
Nlayerappv3
Domain Driven Design (DDD) N-LayeredArchitecture with .Net Core 2
Stars: ✭ 138 (-20.23%)
Mutual labels:  dotnet-core, dotnetcore
Netbarcode
Barcode generation library written in C# and .NET Standard 2
Stars: ✭ 149 (-13.87%)
Mutual labels:  dotnet-core, dotnetcore
Dotnetlabs
.NET Labs -- Show Me the Tips and Tricks and Code
Stars: ✭ 135 (-21.97%)
Mutual labels:  dotnet-core, dotnetcore
Mmalsharp
C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
Stars: ✭ 152 (-12.14%)
Mutual labels:  dotnetcore, mono
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+886.71%)
Mutual labels:  database, rocksdb
Eventflow.example
DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.
Stars: ✭ 131 (-24.28%)
Mutual labels:  dotnet-core, dotnetcore
Pomelo.entityframeworkcore.mysql
Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
Stars: ✭ 2,099 (+1113.29%)
Mutual labels:  database, dotnet-core
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+1220.81%)
Mutual labels:  dotnet-core, dotnetcore

rocksdb-sharp

RocksDb for C#

RocksDB is a key-value database with a log-structured-merge design, optimized for flash and RAM storage, which can be tuned to balance write-, read-, and space-amplification factors.

RocksDB is developed by Facebook and is based on LevelDB. For more information about RocksDB, visit RocksDB and on GitHub

This library provides C# bindings for rocksdb, implemented as a wrapper for the native rocksdb DLL (unmanaged C++) via the rocksdb C API.

This is a multi-level binding, providing direct access to the C API functions (low level) plus some helper wrappers on those to aid in marshaling and exception handling (mid level) plus an idiomatic C# class hierarchy for ease of use (high level).

Example (High Level)

var options = new DbOptions()
    .SetCreateIfMissing(true);
using (var db = RocksDb.Open(options, path))
{
    // Using strings below, but can also use byte arrays for both keys and values
	// much care has been taken to minimize buffer copying
    db.Put("key", "value");
    string value = db.Get("key");
    db.Remove("key");
}

Usage

Using NuGet:

install-package RocksDbSharp

This will install the managed library which will use the unmanaged library installed on the machine at runtime. If you do not want to install the managed library, you can include it by additionally installing the "RocksDbNative" package.

install-package RocksDbNative

Requirements

On Linux and Mac, the snappy library (libsnappy) must be installed.

Caveats and Warnings:

64-bit only (Especially on Windows)

RocksDb is supported only in 64-bit mode. Although I contributed a fix that allows it to compile in 32-bit mode, this is untested and unsupported, may not work at all, and almost certainly will have at least some major issues and should not be attempted in production.

Extras

Windows Build Script: Building rocksdb for Windows is hard; this project contains a build script to make it easy.

Building Native Library

Pre-built native binaries can be downloaded from the releases page. You may also build them yourself.

(This is only a high level (and low level) wrapper on the unmanaged library and is not a managed C# port of the rocksdb database. The difficulty of a potential managed port library almost certainly far exceeds any usefulness of such a thing and so is not planned and will probably never exist).

This is now buildable on Windows thanks to the Bing team at Microsoft who are actively using rocksdb. Rocksdb-sharp should work on any platform provided the native unmanaged library is available.

Windows Native Build Instructions

Prerequisities:

  • Git for Windows (specifically, the git bash environment)
  • CMake
  • Visual Studio 2017 (older versions may work but are not tested)

Build Instructions:

  1. Open "Developer Command Prompt for VS2017"
  2. Run git's bash.exe
  3. cd to the native-build folder within the repository
  4. execute ./build-rocksdb.sh

This will create a rocksdb.dll and copy it to the where the .sln file is expecting it to be. (If you only need to run this in Windows, you can remove the references to the other two platform binaries from the .sln)

Linux Native Build Instructions

  1. cd native-build
  2. ./build-rocksdb.sh

Mac Native Build Instructions

  1. cd native-build
  2. ./build-rocksdb.sh

Note: On a Mac, although a change I contributed now allows RocksDb to compile in 32 bit, it is not supported and may not work. You should definitely only run 64-bit Mono to use RocksDb with Mono on Mac.

TODO

  • Many of the less-commonly-used C-API functions imports are yet to be included.
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].