Giter Club home page Giter Club logo

contestrus's Introduction

Contestrus

Contestrus is a platform for hosting algorithmic competitions. It is planned to feature:

  • Different task styles. ACM ICPC (Accepted/Not accepted) ✓, IOI (Partial scores), Open/Hidden Input.
  • Customized contest forms. Contestrus comes with built-in importers for a simple contest format, but it's easy to write importers from an existing format. ✓
  • Simple, fast interface. A useful interface that helps the participants as much as possible.
  • API. An API that lets users submit their programs via an API and view their status.
  • Sandboxing. Sandboxing is provided by running each submission within its own Docker container. ✓
  • Administration interface. An interface to monitor and edit contests. ✓
  • Contest and training. Support both running contests but also an open environment to train on tasks of previous contests. ✓
  • Support for teams.
  • Announcements. Ability to push announcements to participants during a competition.

Many contest environments are complicated to set up. Contestrus is aiming to be extremely simple to set up and will be run inside Docker containers for maximum deployment and development ease.

Current status is that it definitely works and the core is pretty stable. It's been used to host competitions at Shopify without problems.

Development

Development should be done in a Vagrant box so all development environments closely reflect production environments and other developers' environments.

Run vagrant up to create an Ubuntu Saucy64 box for local development. This will run a provision script also used for production to install:

  • Basic packages (openssl, libxml2, lxc, ..)
  • Compile and install Ruby 2.0.0
  • Install Docker and relevant system patches
  • Docker containers for languages supported by Contestrus
  • Sets up Contestrus's development database
  • Installs Contestrus's gems

Once that's all done, you can go to the repository and run the tests:

## On host box

# This will take a good while the first time to download and install everything.
# Network is the main bottleneck here. script/provision-development is run when
# the box is booted to provision it.
$ vagrant up
# ssh into the now provisioned Vagrant box.
$ vagrant ssh

## Inside Vagrant-managed box
$ cd /vagrant # Shared directory with host for Contestrus
$ bin/rake # Run all tests

You can then run bin/rails server to boot the Rails server from within Vagrant. This listens on port 3000 inside the Vagrant box. This is forwarded to port 3001 on your own machine.

Sample competition

You can import the sample competition with bundle exec rake competition:import[contests/punchball]. Start the Rails server with bundle exec rails server. It should then be accessible on port 3005 on the host, forwarded from the Vagrant-managed VM.

Deployment

Coming soon. For now script/provision-production should do the trick on an Ubuntu Raring x64 box.

contestrus's People

Contributors

sirupsen avatar bouk avatar

Watchers

Gleb Mazovetskiy avatar 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.