Uses NGINX, Redis, and PM2 to horizontally scale to handle a theoretically million simultaneous user game of hangman. Game only tested up to 60,000 simultaneous playing users. Mocha on the testing farm keeps running out of memory, server however does not have memory issues and should be able to scale fantastic.
###Why Socket is way way fast than Restful HTTP
#Game Rules
- 10 trys for each game
- Users Can't submit same characte twice
- submit characters to game by using the
/submit
command
#HOW TO USE SERVER THE EASYWAY
- turn on server
npm install
SIMPLE=true node app.js
- make sure to find your ip address,
localhost
will not work, run this command in terminal to find your ip addressifconfig en1 | grep 'inet ' | cut -d ' ' -f 2
- navigate to your ip address and port 3000 in browser
http://192.168.0.17:3000
- view game statistics via API GET REQUEST at /api/gameStats
http://192.168.0.17:3000/api/gameStats
- run the tests using mocha
mocha
#Environment Variables
DISABLE_BROADCAST=0
disables slow broadcast messagingSIMPLE
disables reddis for message queue and socket managementHOST
SOCKET_HOST
sets the server IP addres, useful for testingPORT
SOCKET_PORT
sets the server PORT address, useful for testingREDIS_HOST
REDIS_PORT
sets the redis HOST and PORT
READ MAC INSTRUCTIONS README.md to get started on deploying the server farm and private cloud or local dev
- Frontend
- Backend
- Quality Assurance
- DevOps
- username is uniquely fingerprinted from the start
- DevOps Architecture for frontend + backend + clients as implemented (not using cloud foundary)
- usernames and IDs limited to 7 characters
- /commands limited to 7 characters
- user can only send 1 character at a time during the voting session
- Heavy Inspiration
- The ideal architecture is in the following diagram