Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

gyf1214/norewar-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoreWar-Rails

An implement of NoreWar competition game on rails. See SHSTuring/norewar for more information about NoreWar.

Requirements

I use Ruby 2.0.0p353 & Rails 4.0.2. Other versions is untested but Ruby 1.9.7 & Rails 4.0.2 are required at least.

Mongo is required for database. I use version 2.4.5.

Redis is required for cache. I tested with version 2.6.16. According to Sidekiq version 2.4 is required at least.

Installation

Use Bundler to install all the gems required:

bundle install

If you have not installed Bundler install it first:

gem install bundler

Execution

Start Mongo & Redis first.

Thin is used as the web server. Start it with:

bundle exec thin start

Start Sidekiq to process matches:

bundle exec sidekiq

For thread safety of mongo, the pool size of working threads & mongo connections should be limited. For efficiency consideration, I set the connection pool size to 10 & thread pool size to 4. Check your config/mongo.yml for configuration and use the following command to start Sidekiq: (which provide default configuration starting 25 threads!)

# start 4 working threads
bundle exec sidekiq -c 4

Problems

Please open an issue.

Contribution

Please open a PR.

About

A NoreWar Implement on Rails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published