Giter VIP home page Giter VIP logo

chain-replication's Introduction

INSTRUCTIONS
------------

[Dependency: C++]

- Autotools, Libtool, pkg-config
- Clang (v3.4.0 is known to work) or GCC (v4.8.2 is known to work)
- Boost (v1.54.0 is known to work)
- Protocol Buffers (v2.5.0 is known to work)
- JsonCpp (v0.5.0 is known to work)
- Google Log (v0.3.3 is known to work)

[Compilation: C++]

1. Install library dependencies

Mac OS X:
	$ brew install boost
	$ brew install protobuf
	$ brew install jsoncpp
	$ brew install glog
Ubuntu:
	$ sudo apt-get install libboost-all-dev
	$ sudo apt-get install protobuf-compiler libprotobuf-dev
	$ sudo apt-get install libjsoncpp-dev
	$ sudo apt-get install libgoogle-glog-dev
Fedora:
	$ sudo yum install boost-devel
	$ sudo yum install protobuf-compiler protobuf-devel
	$ sudo yum install jsoncpp-devel
	$ sudo yum install glog-devel
FreeBSD:
	$ sudo pkg install boost-libs
	$ sudo pkg install protobuf
	$ sudo pkg install jsoncpp
	[https://gist.github.com/wkl/e8c8157cb5da10bcc061 pkg-config file]
	$ sudo pkg install glog

2. Build from git repo

	$ autoreconf -if  # generate the configure script and Makefile.in files
	$ ./configure
	$ make

(or Build from distribution)
	$ ./configure
	$ make

[Running: C++]

1. Run test cases manually

	$ cd <chain-replication>/src-cpp
	$ master/master -c ../config/test1.json -l ../logs &
	$ server/server -c ../config/test1.json -b bank1 -n 1 -l ../logs &
	$ server/server -c ../config/test1.json -b bank1 -n 2 -l ../logs &
	$ client/client -c ../config/test1.json -l ../logs
	$ killall server
	$ killall master

2. Run test cases with script (preferred)

	$ cd <chain-replication>/src-cpp
	$ ./run_case_server.sh 1
	$ ./run_case_client.sh 1
	$ ./run_case_server.sh 2
	$ ./run_case_client.sh 2
	...

3. Logging

	$ cd <chain-replication>/logs
	$ cat server_bank1_No1.INFO
	$ cat server_bank2_No1.INFO
	$ cat server_bank2_No2.INFO
	...

[Running: Distalgo]

Assume Distalgo(1.0.0b8) is installed

	$ cd <chain-replication>/src-da
	$ python3 -m da chain.da ../config/test1.json
	$ python3 -m da chain.da ../config/test2.json
	...

or append log to 'chain.log':
        $ python3 -m da -f -F info -L info chain.da ../config/test1.json

or append log to specific file:
        $ python3 -m da -f --logfilename test1.log -F info -L info chain.da ../config/test1.json

MAIN FILES
----------

src-cpp/
  master/master.{h,cc}	# Master server code
  server/server.{h,cc}	# Chain server code
  client/client.{h,cc}	# Client code
  common/message.{h,cc,proto}	# Communication
  common/{bank,account,common}.h	# Misc
src-da/
  chain.da	# Distalgo code for Master, Chain server and Client


CONTRIBUTIONS
-------------

C++
- Communication (Kelong)
- Master/Server/Client state machine (Dandan, Kelong)
- Logging (Dandan)
- Configuration (Dandan)

Distalgo (Python)
- Master/Server/Client state machine (Kelong)
- Logging (Kelong)
- Configuration (Dandan)

Common / Misc
- Test case generating (Dandan)
- C++ Automake (Kelong)


OTHER COMMENTS
--------------

- Pseudo-code is not updated.
- Distalgo currently does not run on OS X.
- Phase 4 is implemented with C++.

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.