GithubHelp home page GithubHelp logo

p3's Introduction

#WarrenBuffetGame

A stock market simulator built in Go.

Architecture

Our p3 has three main components: the client (StockClient), the game server (StockServer), and the storage server (CohortServer) The StockServer consists of multiple layers. The top layer receives RPC calls from the client and passes the command to its Libstore. The Libstore then performs some basic checks whether the user/team exists, and then passes the command to the coordinator (also on the game server).

The Coordinator initiates and oversees the 2PC process for the requested transaction. We changed our design to move the Coordinator onto the StockServer in order allow for multiple coordinators, particularly for the case in which the coordinator dies, as in standard 2PC, progress can no longer be made.

Usage

We have created runners for each of the components of our game. These can be run as follows:

Storage:./srunner -master=<masterHostPort> -self=<selfHostPort>

Note: Additional flags can also be specified such as -N (number of storage servers in the ring) and -id (the nodeID assigned to that server)

GameServer:./strunner -master=<storageMasterHostPort> -self=<selfHostPort>
Client:./crunner -port=<GameServer Port>

In addition, we have created a wrapper around these structure for convenience. There is a shell runner in the top-level directory named game.sh. If you execute chmod 7777 game.sh (to allow permissions), you will then be able to run the client (and all other necessary components) through the shell script.

Testing

The test file is located in tests/ and is called test_basic.sh In order to run the test file, fix permissions same as above and execute ./test_basic.sh

p3's People

Contributors

zeppelinnn avatar

Watchers

Roy T.Burns avatar 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.