GithubHelp home page GithubHelp logo

idodod / scdb Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 263 KB

SolidCoreDataBase:It is a simple key-value database based on bitcask

Home Page: https://hub.docker.com/r/skj2414e954/scdb

License: Apache License 2.0

Go 100.00%

scdb's Introduction

SCDB

logo

Solid Core Database System

Solid Core Database is a basic key-value database engine that is true to the fundamentals, fast, and easy to access.

Features

  • scdb is a lightweight and fast key-value storage engine that stands out for its simplicity and speed. It's modeled after the Bitcask storage architecture, renowned for its efficiency in write operations.

  • The core design principle behind scdb (and Bitcask) is influenced by log-structured filesystems. In this approach, all changes are appended to the end of a log, making writes exceptionally fast because they're sequential. This design is not only quick but also ensures the integrity of your data: even in the event of a system crash, you can recover the data easily thanks to this append-only method.

  • Additionally, scdb incorporates a process known as log file merging. Over time, as your application writes more data, the number of log files will naturally increase. Log file merging is a technique that combines these files to prevent fragmentation and maintain performance. It's like housekeeping for your data, ensuring that your storage remains organized and efficient.

  • So, if you're developing an application that requires speedy data writes and a simple yet robust storage solution, scdb might just be the engine you're looking for. It's built to give developers like you a hassle-free experience with the storage and retrieval of key-value pairs.

architecture

SDK versions

Scdb version Recommended Go SDK version
1.0.0-alpha 1.0.0-alpha
1.0.0 1.0.0-rc

Install Scdb Go SDK

(We plan to create an SDK repository for SCDB in the future.)

  1. Use go get to install the latest version of the Scdb Client and dependencies:

    go get -u github.com/sjy-dv/scdb/scdb/pkg/scdbclient/[email protected]
  2. Include the Scdb in your application:

    package main
    
     import (
         "context"
         "log"
    
         scdbclient "github.com/sjy-dv/scdb/scdb/pkg/scdbclient/v1"
     )
    
     func main() {
         conn, err := scdbclient.NewScdbConn("127.0.0.1:50051")
         if err != nil {
     	    log.Fatal(err)
         }
         defer conn.Close()
         err = conn.Ping(context.Background())
         if err != nil {
     	    log.Fatal(err)
         }
     	err = conn.Save(context.Background(), "greeting", []byte("helloworld"))
     	if err != nil {
         	log.Fatal(err)
         }
         val, err := conn.Get(context.Background(), "greeting")
         if err != nil {
     	    log.Fatal(err)
         }
         log.Println(string(val))
         err = conn.Del(context.Background(), "greeting")
         if err != nil {
     	    log.Fatal(err)
         }
     }

Docker

docker pull skj2414e954/scdb:latest
docker run -d -p 50051:50051 -p 6727:6727 skj2414e954/scdb:latest

img

scdb's People

Contributors

sjy-dv avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.