Deprecation Notice: Due to the limits of Python only using one core and general low Python performance on non-C modules, the aio-replayserver has been superseded by its Rust variant. This server still works as is without major flaws and has served us for multiple years.
This is a prototype for the new FAF replay server. It uses asyncio a lot and hopefully is better designed than the old replay server.
You can find documentation in the doc directory. It's built with sphinx using autodoc, so you'll need to install server dependencies to generate it properly - see the 'dev environment' section. Docs can be built with:
sphinx-build -b html ./doc ./doc_html
Documentation covers both server requirements and architecture.
You'll need to setup faf-db for most work requiring a database. See instructions at https://github.com/FAForever/db and .travis.yml for details on how to start the container and populate it with test data. Once you setup faf-db, run the setup_db.py script to populate it with test data:
env FAF_STACK_DB_IP=127.0.0.1 python3 tests/db_setup.py
For python packages, just install dependencies in requirements/main.txt and requirements/test.txt in a virtualenv. Once everything is setup, you can run tests with:
env FAF_STACK_DB_IP=127.0.0.1 python3 -m pytest
You can install the replay server to your virtual environment with:
pip3 install .
Before you can run it, you will need to set up some configuration (see
doc/configuration.rst for details). To configure using a YAML file, copy the
example_config.yml
and edit the database and vault path options. You should
now be able to start the server with:
env RS_CONFIG_FILE=config.yml faf_replay_server