Coder Social home page Coder Social logo

phoihos / microraft Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microraft/microraft

0.0 1.0 0.0 4.32 MB

Feature-complete implementation of the Raft consensus algorithm

Home Page: https://microraft.io

License: Apache License 2.0

Java 99.86% Shell 0.14%

microraft's Introduction

Integration

MicroRaft is a feature-complete and stable open-source implementation of the Raft consensus algorithm in Java. It is a single lightweight JAR file of a few hundred KBs of size. It can be used for building fault tolerant and strongly-consistent (CP) data, metadata and coordination services. A few examples of possible use-cases are building distributed file systems, key-value stores, distributed lock services, etc.

MicroRaft works on top of a minimalistic and modular design. It is a single lightweight JAR with a few hundred KBs of size and only logging dependency. It contains an isolated implementation of the Raft consensus algorithm, and a set of accompanying abstractions to run the algorithm in a multi-threaded and distributed environment. These abstractions are defined to isolate the core algorithm from the concerns of persistence, thread-safety, serialization, networking, and actual state machine logic. Users are required to provide their own implementations of these abstractions to build their custom CP distributed systems with MicroRaft.

Please note that MicroRaft is not a high-level solution like a distributed key-value store or a distributed lock service. It is a core library that offers a set of abstractions and functionalities to help you build such high-level systems.

Features

MicroRaft implements the leader election, log replication, log compaction (snapshotting), and cluster membership changes components of the Raft consensus algorithm. Additionally, it offers a rich set of optimizations and enhancements:

Getting Started

See the User Guide.

Building from Source

Pull the latest code with gh repo clone MicroRaft/MicroRaft and build with cd MicroRaft && ./mvnw clean package.

Source Code Layout

microraft module contains the source code of MicroRaft along with its unit and integration test suite.

microraft-hocon and microraft-yaml modules are utility libraries for parsing HOCON and YAML files to start Raft nodes.

microraft-metrics module contains the integration with the Micrometer library for publishing MicroRaft metrics to external systems.

site-src contains the source files of microraft.io.

Contributing to MicroRaft

You can see this guide for contributing to MicroRaft.

License

MicroRaft is available under the Apache 2 License.

MicroRaft originates from the Raft implementation that powers Hazelcast IMDG's CP Subsystem module. You can see the announcement for details.

microraft's People

Contributors

metanet avatar m1l4n54v1c avatar dependabot[bot] avatar mdogan avatar jerrinot avatar

Watchers

James Cloos 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.