bgianfo / distributed-systems Goto Github PK
View Code? Open in Web Editor NEWDistributed Systems @ RIT
Home Page: http://distrivia.lame.ws
Distributed Systems @ RIT
Home Page: http://distrivia.lame.ws
######################################################################## # Distrivia Phase 2 Readme # # Instructions for installation # # and usage # ######################################################################## Members: - Brian Gianforcaro <[email protected]> - Steven Glazer <[email protected]> - Samuel Milton <[email protected]> Project Layout: p3.pdf - Project specification phase-zero.pdf - Phase zero submission phase-one.pdf - Phase one submission phase-two.pdf - Phase two submission phase-three.pdf - Phase three submission doc/ - Project documentation & scripts src/ - Main project source tree papers/ - Location for all the various P3 outlines and papers poster/ - Location for the projects poster materials Makefile - Overarching makefile Installation: 1. Servers ---------- The servers are up and running along with the load sharers. Everything concerning the server is ready to go and requires no installation. 2. Web Client ------------- No installation necessary. Simply open your preferred web browser and navigate to distrivia.lame.ws. The web client will display the login/register screen. Instructions on how to use the web client are below. 3. Android Client ----------------- a) Simulator - Open Eclipse (must be setup with Android SDK). From the menu, select File->Import... When the window pops up, select "Exisiting Project" from the "General" folder. Navigate the import window to: /src/clients/android Select the project and click through to complete import. When the project is loaded, you may Run as Android Application. This will launch the Android Simulator and load the application. b) Device - follow the steps followed at the following link: http://developer.android.com/guide/developing/device.html 4. iPhone Client ---------------- a) Simulator - Open the XCode project file using a Mac: /src/clients/iphone/distrivia/distrivia.xcodproj Select to use the simulator and make sure you have iPhone selected from the dropdown box in the upper-left. The simulator should pop open and load the app. b) Device - For this to work, the device must be registered with the "CS Development" Provisioning Profile. If this is the case, follow the same steps for running the app using the simulator (above) but choose device from the dropdown box instead of simulator. The app will install on the device and run automatically. Usage: ------ The web, android, and iPhone clients share the same format to make it easy to navigate and understand each client without learning a new interface. The gameplay for our application is broken up into 4 distinct activities or views: login/register, join public/private, compete, and view leaderboard. The activities work in this order and descriptions of the activities and how to use them is explained below. 1. Login/Register ----------------- This is the first screen you will see when loading from any client. If you have not previously registered a username and password, you will want to type a username and password and select the "Register" button. Otherwise, if you have a username completed, you may type your username and password in and select the "login" button. If login/registration is successful, you will be taken to the join screen. Otherwise, make sure you are using the correct username and password and try again. 2. Join (Public/Private) ------------------------ The join screen gives you the option to join a public round, compete in a private round, or view the current global leaderboard. If you would like to view the current global leaderboard, you may select the "View Global Leaderboard" button. The global leaderboard shows the standing of the players based on all their rounds they've played. If you're ready to compete in a public game, select the "Join Public" button. You will be shown a waiting screen until enough players have joined public games to compete with. Currently, the number of players in a public game to start a round is 2 (for testing). Once enough players have joined, the round will begin and you will be taken to the compete screen. 3. Compete ---------- The competition screen will display a series of questions and and answers. Currently, this screen is only fully implemented on the web client. Read the question, select an answer and then select the "Ok" button. This will submit your answer and you will be given more questions and answers until the round is over. Depending on the client, you will see different reactions for whether you have answer the question correctly. Once the round is completed, you will be taken back to the join screen to join another round. If you are competing on the android or iphone client, you will be taken to the round leaderboard to see the scores of the other players in the round. For the web client this is shown while in the round. 4. View Leaderboard ------------------- The leaderboard screen shows the standings of players of Distrivia. There are two forms of the leaderboard. One leaderboard shows the players with the global rankings. This global leaderboard can be accessed from the join screen using the "View Global Leaderboard" button. The other leaderboard shows the rankings of the players in a round. For the web client, this is shown while competing in the round. For the android and iphone clients, this is shown upon completion of the round. Contributions: -------------- This section outlines the contributions of each team member to the different components of the project. The order of each contributor is in order of those teammates who contributed most to least. 1. Server --------- Brian Sam 2. Database ----------- Brian 3. Load Balancers ----------------- Brian Steven 4. DNS ------ Brian 5. Web Client ------------- Sam Brian 6. Android Client ----------------- Brian Steven Sam 7. iPhone Client ---------------- Steven Brian
At least two hot spares need to be added to the backend cluster for redundancy.
The following tasks need to occur:
- Add instances on EC2
- Configure the software
- Add to monitor
- Join nodes into the Riak cluster.
- Add IP's to load distributer
A user can submit the same question / answer multiple times and get points for each one
Should be able to tie into the public game code
Add implementation for private games. Needs API and implementation
The n_val in the Riak config needs to be updated ( currently is 3 ) to the number of nodes in the cluster ( currently 5 ).
This being wrong makes data not replicate to all nodes in the cluster, so inconsistencies can be seen at times.
Need to store a file if user has registered before, otherwise allow them to register
Add more feedback to user for their commands
Need to get the API working and all the methods created to get the iPhone client going
It seems about half the time when logging in or registering using the Android app, the app hangs indefinitely. Not sure if it is something with the network call or something local. Need to investigate
Need to give a button to allow user to get back to join screen. I've added a button to the xml doc, but haven't gotten it to correctly show yet.
Currently only public games are supported, a little bit of python work and database work needs
to happen in order to make private games available.
Error codes for joining private games need to be corrected to the API.
Documentation of other status codes would be good too (if they're used anywhere else).
Sam was awesome enough to write a formal API spec, it fixes some uglies that I had in my original implementation.
Check it: https://github.com/bgianfo/distributed-systems/raw/master/doc/API.txt
Needs to be implemented ASAP.
Somehow session IDs are ending up in the returned userlist for the universal leaderboard
Right now the web app uses default transport for communication with the database.
Some state that the protobuf transport is 2X faster, it would be a good idea to at least test.
Whenever a load balancer is down, at least on the Android client, the connection reliability is random
Game leader board exists, but a global version needs to be implemented.
Lot's of code can probably be re-used.
SSL is possible and setup for the web app servers, but the load balancer's don't know how to
point to that yet. This needs to be fixed.
fix the layout for the leaderboard activities
Need to provide the user with a way to cancel waiting to join a game.
The leaderboard scores don't update after a game is over. An updater should pull new scores every 10 seconds or so until the leaderboard is closed after the game has finished.
When clicking Register, it will call the register API method, but will not actually return an auth token. It needs to then log the user in to retrieve the auth token
Need to create a thread to update the local leaderboard while the user is still viewing it. Not even sure of the call to get an updated leaderboard.
Connect major functions of Android app to Brian's api.
Join
Questions
Login
Register
Passwords need to be added to the following sections of the API:
- /login
- /register
Need to create a root view controller class that has references to each view and a way to switch them in and out. It could also house data like our Android equivalent
Sam brought this up, it might save some API calls which are the slowest piece for system.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.