Coder Social home page Coder Social logo

raft-badger's Introduction

Build Status Coverage GoReport GoDoc

raft-badger

This repository provides the raftbadger package. The package exports the BadgerStore which is an implementation of both a LogStore and StableStore.

It is meant to be used as a backend for the raft package here.

This implementation uses BadgerDB. BadgerDB is a simple persistent key-value store written in pure Go. It has a Log-Structured-Merge (LSM) design and it's meant to be a performant alternative to non-Go based stores like RocksDB.

Documentation

The documentation for this package can be found on Godoc here.

Contributions

Contributions are very welcome, see CONTRIBUTING.md or skim existing tickets to see where you could help out.

License

raft-badger is Open Source and available under the Apache 2 License.

raft-badger's People

Contributors

aalda avatar fernandezvara avatar iknite avatar panchoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raft-badger's Issues

How to use?

Thanks for sharing. I can't believe nobody has starred this until me!

I'm not quite sure how to use this with my BadgerDB. Do I use 2 BadgerDB databases, as in one for Raft and one for my data store?

If it's not too much trouble, could you please create a simple distributed BadgerDB example?

Add logging support

VLog garbage collection executions should be traced. It would be nice to use an interface based logger option with multi-level output support. We would have to add a new WithLogger constructor to the store accepting an interface rather than requiring a *log.Logger struct so that logging could be further customized and swapped out other systems.

Module path should be "github.com/BBVA/raft-badger", not "github.com/bbva/raft-badger"

Background

Module path is inconsistent with go import path.
GO111MODULE=on, as doc said, import "github.com/BBVA/raft-badger", then get this error:

go: finding module for package github.com/BBVA/raft-badger
go: downloading github.com/BBVA/raft-badger v1.0.1
go: found github.com/BBVA/raft-badger in github.com/BBVA/raft-badger v1.0.1
go: test1 imports
        github.com/BBVA/raft-badger: github.com/BBVA/[email protected]: parsing go.mod:
        module declares its path as: github.com/bbva/raft-badger
                but was required as: github.com/BBVA/raft-badger 

Solution

Fix the module path:

  1. Rename the module path to "github.com/BBVA/raft-badger": https://github.com/BBVA/raft-badger/blob/master/go.mod#L1
module github.com/BBVA/raft-badger
go 1.14
require (
	…
) 

  1. Change the doc document to use import "github.com/bbva/raft-badger".

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.