Giter Club home page Giter Club logo

war-games's Introduction

war-games

Fullstack War Game

App definition During the Tikal Annual fuseDay we had the following challenges:

Each team can deploy on all the team members' personal computers (limited by the number of the participants of the smallest team)

Each team is free to choose ANY technology stack as long as it meets the requirements stated above. The starter project is just a suggestion) Pair programming and cross discipline development is encouraged but remember this is a competition and you are competing as a fullstack team. The 'death' of a competitor will be determined by a set of parameters such as response time / cpu / memory consumption - which will be determined at the beginning of the contest based on a determined benchmar

In order to overcome these challenges we did as follows: Created an NGix checkin server - a server that will accept checkins from anonymous peers indicating a unique user id (128 bit UUID such as 123e4567-e89b-12d3-a456-426655440000), longitude, and latitude (in decimal degrees format) The checkin API is a post request with the data payload as a JSON for example: { "userId":"e433d0f4-5074-4fb5-9b7a-c245b7f8ed6e", "latitude":32.115402, "longitude":34.843444 }

The Ngix server sends the received requests to an Elastic Search service which stores the checkins data. A node.js server that serve a web-based ui, this server suppose to query the Elastic-Search and send the data back to the UI. UI - display incoming (checkin) and outgoing (attack) stats and status (health, cpu, memory etc.)

Architecture To support high concurrency, we decided to drop spring and use Ngnix as our front end server. Ngnix serves as a filter and proxy, redirecting incoming requests into Elastic Search (ES). ES saves all incoming json requests, providing persistency and search capabilities.

For the client side front end, we use the ionic framework, which supports easy developemnt of mobile web http://ionicframework.com/ A NodeJS instance serves the client requests, queries the ES and presents a resulting map using open layers http://openlayers.org/

To get real time HTTP statistics of our server we use goaccess: http://goaccess.io/ We run goaccess periodically using cron, updating ES with the results. The client queries ES for this data via NodeJS and presents it in the health tab.

For load testing, we used Locust, a modern load testing tool easily configurable using python, having a nice Web UI: http://locust.io/ Using this tool, we demonstrated our server worked correctly with over 1000 requests per second, generated by several machines. Network bandwidth was the main limiting factors.

war-games's People

Contributors

shavitcohen avatar

Watchers

James Cloos avatar  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.