Rapid

From Spring
Jump to navigationJump to search

"Rapid" is a concept for storing "archives" for spring. It consists of multiple indexes:

spring can directly read .sdp and the pool directory which contains the real files of an archive. multiple .sdp can share the same files in a pool which makes "rapid" so efficient in storage.

Serverside RapidTools are used to manage the repository of all games.

Files structures

file structure of rapid is:

/versions.gz
/repos.gz
/packages/
/pool/

list of rapid repositories: repos.gz

gziped text file which has a list of all rapid repositories.

main,http://packages.springrts.com,,

for springrts it is: http://repos.springrts.com/repos.gz

list of archives on a mirror: versions.gz

gziped text file which has a list of all sdp archives in this repository.

ba-tronic:version:7.12-tronic1,baafb4fb215c60873e7d10e7ec600dc5,Balanced Annihilation V7.12,Balanced Annihilation V7.12-tronic1

the md5 hash is the filename of the sdp of the archive. so for example:

http://packages.springrts.com/packages/baafb4fb215c60873e7d10e7ec600dc5.sdp

folder with index archives: /packages/

this folder contains all available packages (~games) in the rapid file structure.

an index archive: .sdp

gziped index file with a list of all files in this archive. this is for example a game.

filename of the .sdp is:

 md5(md5(filename1) + md5(content of file1) + md5(filename2) + md5(content of file2) ...)

see void PoolArchiveT::load(DigestT const & Digest):

https://github.com/spring/RapidTools/blob/master/Rapid/PoolArchive.cpp#L35 or https://github.com/spring/spring/blob/master/rts/System/FileSystem/Archives/PoolArchive.h

the pool folder

this folder contains all files of the .sdp's in gzipped form. the filename is the md5 of the file. this way files which are used by multiple archives can be shared.

Using rapid as Gamedev

If a Gamedev wants to use rapid, he needs to use a svn repository for his game where the game archive is in the .sdd format stored:

The svn repository needs to contains a folder which is in the structre of a .sdd. in modinfo.lua version has to be

version = '$VERSION',

$VERSION later on will be replaced by the svn commit number or, when a release is made, the version number of the release.

creating a release

When the SVN repository is connected to rapid, a release can be made by making a svn-commit with a commit message in the format:

VERSION{x.xx}

Where everything in the brackets will replace $VERSION in modinfo.lua.

This will create a tag :stable for this commit and create an archive at http://packages.springrts.com/builds/ which can be distributed/uploaded to different sites if needed. It is also automatically published to upq at http://api.springfiles.com/ which all current download systems have access to; you can validate what happened there, too.

adding your game to the rapid download system

This is deprecated, please use a svn repository! forum thread


To download you can use one of the Rapid_Tags.