SLDB (Spring Lobby DataBase) is a data warehouse and real time ranking application for all games based on SpringRTS engine. It is designed to offer all the required functionalities to manage the player base in the context of FOSS (Free Open Source Software) games, where players can create as many accounts as they want and games can be hosted by anyone. For this purpose, following functionalities have notably been implemented:
- advanced automatic multi-accounts ("smurfs") detection
- automatic and manual (by admins) accounts join/split
- by-game and by-game-type TrueSkill ranking system to optimize players balance on all types of games
- retro-active account management regarding ranking (automatic re-rating of all required matches when new accounts are joined/split)
- protection against fake data sent by thrid parties
- configurable privacy levels to limit account information disclosure
SLDB is also designed to allow fast access to historical data concerning all games and players using main Spring lobby since July 2012 (matches results, ranking data, statistics...).
- ratingEngine.pl: Rating engine
- Sldb.pm: Data model layer module
- sldbBackup.pl: Backup script
- sldbLi.pl: Lobby interface bot
- SldbLiConf.pm: Configuration management module for the lobby interface bot
- sldbSetup.pl: Setup script
- slMonitor.pl: Lobby monitoring application
- xmlRpc.pl: XmlRpc interface
- zkMonitor.pl: Zero-K monitoring application (deprecated)
- Lobby interface configuration templates: Templates for the configuration of the lobby interface bot (other SLDB configuration files are generated in the same directory by the setup script)
- var/help.dat: Data file for the commands help of the lobby interface bot.
Please see the file called COMPONENTS for a more detailed description of each component.
The SLDB lobby inteface bot is based on the templates provided by following project:
The SLDB application is based on a partitionned database which requires MySQL 5.5 or later.
The SLDB application depends on following projects:
The SLDB backup script requires following dependencies, which are only needed if you plan to use this script for your backups:
Additionally, some SLDB components require some standard but non-core Perl modules to be available on the system (easily installable through CPAN):
- all components require the "DBI" Perl module
- sldbSetup requires the "Term::UI" Perl module
- ratingEngine requires the "Inline::Python" Perl module
- xmlRpc requires the "RPC::XML::Server" Perl module ("Net::Server::PreFork" is also highly recommended)
- zkMonitor (deprecated) requires the "HTML::TreeBuilder" and "WWW::Mechanize" Perl modules
SLDB also depends on following project (hosted remotely) for additional functionalities:
- spring replay site for HTTP interface to some SLDB data.
Ensure MySQL 5.5 or later is installed on the system
Copy following dependencies into SLDB directory: SimpleConf.pm, SimpleLog.pm and SpringLobbyInterface.pm
Install the TrueSkill python module as "trueskill" subdirectory of SLDB (version "0.2.1" is known to be compatible with SLDB)
Use your favorite Perl package manager to install following standard Perl modules (available on CPAN) and their dependencies: Inline::Python, RPC::XML::Server, Net::Server::PreFork (and also HTML::TreeBuilder and WWW::Mechanize if you plan to use the deprecated zkMonitor component)
run the sldbSetup.pl script from SLDB directory and execute all steps, as selectionned by default by the script
Insert rows in the "gamesNames" table of the SLDB database to declare the list of games for which TrueSkill should be enabled (the regex fields are in standard MySQL/MariaDB regular expressions format, as described here)
Edit the etc/sldbLi.conf file to set following parameters:
- lobbyPassword (password of the lobby account used by sldbLi)
- sldb (replace <dbLogin>, <dbPwd> and <dbName> by the corresponding values for SLDB)
- etcDir (directory containing sldbLi config files, should be the "etc" subdirectory of SLDB)
- varDir (directory containing sldbLi dynamic data, should be the "var" subdirectory of SLDB)
- logDir (directory containing sldbLi log files, should be the "var/log" subdirectory of SLDB)
Edit the etc/users.conf file and update the <> placeholders with the desired privileged lobby user names and account IDs for SLDB
You are now ready to launch all SLDB components, using recommended order:
./slMonitor.pl ./ratingEngine.pl ./sldbLi.pl ./xmlRpc.pl
SLDB includes a basic backup script: sldbBackup.pl
The "Configuration" section of this script must be edited before first use, to match host environment (in particular, a LFTP bookmark must be created first to store the remote FTP server connection information).
This script requires an account with sufficient privileges to run mysqlhotcopy. It can be launched manually once with verbose option to check that all works as expected:
Then it is recommended to schedule this script to be executed weekly in off peak periods, using crontab for example.
Please see the file called COMPONENTS for a description of each SLDB component.
Please see the file called TABLES for a basic description of SLDB data model.
Please see the file called XMLRPC for a description of the XML-RPC interface.
Please see the file called LICENSE.
Yann Riou firstname.lastname@example.org