Code Monkey home page Code Monkey logo

cpsc416-bagel's Introduction

BAG:EL

Best Algorithms for Graphs: Easy Learning

A distributed graph processor based on the Pregel API. Possible operations are:

  • finding the shortest path between two vertices
  • finding the PageRank of a given vertex
    • in our implementation, the sum of the PageRanks across all vertices sum to |V|

Makefile Targets

  • all to build the worker, coord, client, database, and cnf
  • worker
  • coord
  • client
  • database
  • cnf
  • test to run the unit test for the worker
  • clean to remove the build files and clean the cached test results

Running the code

  • After building, the binary files will be found in the ./bin folder
  • To configure the config files (worker, coord, client)
    • ./bin/cnf [sync|port|azure]
      • ./bin/cnf sync - will synchronize the client and worker config files to point to the correct coord port numbers
      • ./bin/cnf port - will randomly assign ports (based on rand.Int()) to all the configuration files, and call ./bin/cnf sync (automatically syncs worker and coord to the correct coord ports)
      • ./bin/cnf azure [coordServer] [clientServer] - based on the list of Azure VM addresses, will assign the correct server addresses to all the configuration files.
        • ./bin/cnf azure [coordServer] [clientServer]
          • [coordServer] - specify the name of the remote server for the coord to run on
          • [clientServer] - specify the name of the remote server for the client to run on
    • (tl;dr) To run on Azure servers
      1. git checkout -b <branch_name>
      2. make cnf
      3. ./bin/cnf port
      4. ./bin/cnf azure [coordServer] [clientServer]
      5. git add . && git commit -m "azure" && git push origin <branch_name>
      6. Take note of the assigned nodes (worker/coord/client) servers
        1. [client_config.json assigned to server Gambier : 20.230.193.58 coord_config.json assigned to server Lulu : 20.83.241.160 worker0_config.json assigned to server Ivan : 52.175.222.198 worker1_config.json assigned to server Go : 20.98.67.22 worker2_config.json assigned to server Remote : 20.230.176.102 worker3_config.json assigned to server Anvil : 20.69.158.88 ]
      7. ssh into the Azure VMs
      8. Pull your branch git fetch -v - a && git switch <branch_name>
      9. make clean all
      10. Run ./bin/[worker|coord|client]
        1. based on the VM you are on and the output seen above
        2. (ie. client_config.json assigned to server Gambier therefore, run ./bin/coord on Gambier VM)
  • Run the following in order to issue a query:
    • ./bin/coord runs a coordinator
    • ./bin/worker [workerId] runs a worker node
    • ./bin/client runs a client instance that can be used to queue up requests
      • client shortestpath {vertex1} {vertex2} runs a shortest path calculation from vertex1 to vertex2
      • client pagerank {vertex} finds the PageRank of the vertex

cpsc416-bagel's People

Contributors

gokcedilek avatar mthibodeau avatar ryanjhkim avatar shaunak avatar

Watchers

 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.