Coder Social home page Coder Social logo

raft-1's Introduction

raft component

what is this component?

This component help you to build a strong consistancy system to replicated data.

For example, you have 5 computers, each of them has a MYSQL database. You want to replicate your data in these 5 MYSQL databases, what you should do is run this raft component in these 5 computers, then use raft client to submit your SQL request.

If over 3(include 3) computers are running well, your system will replicate data to the computers that aren`t dead. When the crash compters reborn, they will update the missing data from others automatically.

Every time you query data through raft client you will get right data if there are over half of computers in the cluster running well.

how to use this component?

  • write the conf.xml in conf folder
  • start the raft component(myRaft.Main.main())

what you need to do to make raft apply to other database?

  • build a class in dbUnit package and implements interface DBpool
  • register your class in the DB class like below:

public class DB { public static DBpool dbpool = new MysqlDBpool();// register your pool object }

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.