Code Monkey home page Code Monkey logo

fpaxos-lib's Introduction

LibFPaxos

LibFPaxos is a extended version of LibPaxos3 which draws a distinction between the quorums used for Paxos's two phases. The code is not production ready and should be used for experimentation only.

LibPaxos3 (Original Readme)

This is LibPaxos3! A complete rewrite of LibPaxos2. LibPaxos3 has been improved in the following aspects:

  • Doesn't make use of multicast
  • Has a cleaner design
  • Has a better build system based on CMake
  • Comes with unit tests

LibPaxos3 is divided in two libraries: libpaxos and libevpaxos.

Libpaxos (see libpaxos/paxos) implements the core of the Paxos consensus protocol, and is not cluttered with network specific code. That is, libpaxos does not depend on any particular networking library.

Libevpaxos (see libpaxos/evpaxos) is the actual networked Paxos implementation. This library is built on top of the libpaxos and libevent.

Building

These are the basic steps required to get and compile LibPaxos3

git clone https://bitbucket.org/sciascid/libpaxos.git
mkdir libpaxos/build
cd libpaxos/build
cmake ..
make

LibPaxos3 depends on libevent and msgpack. By default, LibPaxos3 uses an in-memory storage, with support for a storage backend based on LMDB (see paxos.conf and build options below).

LibPaxos3 should compile on Linux and OS X.

Useful build options

You pass options to cmake as follows: cmake -DOPTION=VALUE

  • LMDB_ROOT=PATH - point it to your installation of LMDB
  • LIBEVENT_ROOT=PATH - point it to your installation of Libevent
  • MSGPACK_ROOT=PATH - point it to your installation of MessagePack

Running the examples

cd libpaxos/build
./sample/acceptor 0 ../paxos.conf > /dev/null &
./sample/acceptor 1 ../paxos.conf > /dev/null &
./sample/proposer 0 ../paxos.conf > /dev/null &
./sample/learner ../paxos.conf > learner.txt &
./sample/client 127.0.0.1:5550 1

Configuration

See paxos.conf for a sample configuration file.

Unit tests

Unit tests depend on the Google Test library. Execute the tests using make test in your build directory, or run runtest from build/unit for detailed output.

Feedback

LibPaxos project page

LibPaxos3 repository

Mailing list

License

LibPaxos3 is distributed under the terms of the 3-clause BSD license. LibPaxos3 has been developed at the University of Lugano, by Daniele Sciascia.

fpaxos-lib's People

Contributors

sciascid avatar atomic77 avatar heidihoward avatar basicthinker avatar pacheco avatar sunxiaoguang avatar

Watchers

Alexander Gallego 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.