Coder Social home page Coder Social logo

jurepolutnik / chess-cloud Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 3 MB

Chess-cloud solution for doing chess analysis in cloud. Consists of highly scalable Akka cluster using StockFish chess engine, modern Playframework/AngularJS web application, adaptable Fabric deployment scripts and simple load testing with Gattling.

Home Page: http://www.chess-cloud.com

Scala 1.48% Python 0.47% JavaScript 65.33% CSS 30.93% HTML 1.02% PHP 0.77% Makefile 0.01%

chess-cloud's Introduction

chess-cloud

Chess-cloud is a prototype system for analysing chess posisitons in cloud environment using StockFish5 chess engine (oen of the best chess eninges that is also open-sourced). Using Akka Cluster, work (chess analysis) is distributed among available workers runnign on different computing nodes. As a foundation pattern described in blog post Balancing Workload Across Nodes with Akka 2 was used.

Chess cluster is accessible through web application writen in AngularJS and PlayFramework. Frontend provides simple and interactive user interface, which allows

  • Playing Chess game with Computer (Cluster Engine)
  • Analysing chess games
    • supports PGN (Portable Game Notation)
    • Play-out current position
  • Small DB of one-of-the-best chess games ever played

Running instance can be found at Chess-cloud.com.

Running (Dev mode)

Frontend: cd frontend/ && sbt run

Cluster: cd cluster/ && sbt run

Open localhost:9000

This commands runs frontend web application and cluster in a development mode. Cluster is made of 1 master available on localhost:2551, 2 workers on random ports and a frontend that is run as part of frontend application in separate actor system.

Deployment

Deployment is done using Fabric scripts and LibCloud. Atm, scirpts supports AWS and OpenStack, however adding additional provider should be fairly easy (extending scripts/driver.py).

Prerequisite

Python, VirtualEnv, Pip > Set up python virtual environment and install requirements.

chesscloud-deps image available in target cloud enviornment. It can be default image, where provision is run (installs Java8) on created nodes.

Configuration

Configuration file conf.ini holds cloud provider authentication, target infrastructure properties (VM sizes), and name of prepared image chesscloud-deps, which should be prepared in advance and will be used when spwning new VMs.

Commands (fabric)

# Creating and deploying cluster
fab create_cluster 
fab deploy_cluster

# Scaling up and down (argument: cluster_node=[frontend|master|worker])
fab scale_up
fab scale_down

# Listing nodes - or selection
fab frontends | masters | workers
fab cluster | all

# Starting and stopping cluster or selected nodes
fab stop_cluster | start_cluster
fab <selection> start|stop

# Destroying cluster or selected nodes
fab destroy_cluster
fab <slection> destroy

# Misc commands - ssh to machine, execute cmd on target machine, ...
fab <selection> ssh | cmd get_log | tail_log

chess-cloud's People

Contributors

jurepolutnik avatar

Stargazers

Brian Cariddi avatar  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.