Skip to content

Commit

Permalink
Add components documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
p2004a committed Aug 4, 2024
1 parent af1a172 commit 4b84724
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 0 deletions.
128 changes: 128 additions & 0 deletions docs/components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Components

Infra is spread across many different repositories, with different functions. On
this page is a current comprehensive list (index like) of everything that BAR
infrastructure consists of.

> [!INFO]
> Even though many of the repositories below are hosting UI visible to players,
> the infrastructure team is not responsible for the design and overall UX
> improvements. The same applies to rating, balancing and data analysis. Other
> BAR development teams are supposed to drive planning and improvements to those
> aspects.
## Live games serving

The server side components responsible for facilitating live games: hosting the
engine instances clients connect to to play the game.

- [Yaribz/SPADS]: Game lobby room hosting and engine handling on game servers.
- [spads_config_bar]: Spads configuration, bar manager plugin, official plugins
configuration.
- [ansible-spads-setup]: Overall game servers configuration.
- [p2004a/recoil-host]: Work in progress [tachyon] protocol autohost.

There is also some monitoring setup: health checks using
[healthchecks.io](https://healthchecks.io/) and Okema's
[Zabbix instance](https://zabbix.bar.gaming.rodeo/).

## Lobby rooms serving

The online components needed to set up and prepare the lobby rooms before the
game happens.

- [teiserver]: The primary piece here responsible for all the:

- Account management logic
- Moderation
- Lobby rooms permissions and management
- Middleware between client side components and SPADS

[hailstorm] are the integration tests.

- [ansible-teiserver]: Teiserver server configuration.
- [tachyon]: Work in progress new lobby server protocol specification.
- Even though the SPADS and its configuration is mentioned in the previous
section, it also belongs here. SPADS is handling both lobby rooms setup and
then game handling.

## Client side infra

Pieces responsible for ensuring that players have all the assets available and
ready to start the game.

- [BYAR-Chobby]: Our current lobby client.

It's responsible for communication with lobby server, launcher, preparing
engine start script.

- [bar-lobby]: New work in progress lobby client.
- [spring-launcher]: Game installer and launcher.
- [flathub/info.beyondallreason.bar]: Linux Flatpak package for launcher.
- [pr-downloader]: CLI application distributed with engine used for downloading
mods/games

Could be interpreted also to belong in the engine team, but it heavily
impacts infra.

- [bar_debug_launcher]: BAR Debug launcher. It's not intended for end users,
it is a developer tool.

## Game assets distribution

Infrastructure responsible for making all the game assets available to players.

- [RapidTools]: Packaging of game git repo to rapid format.
- [rapid-hosting]: Rapid build server configuration.
- Game CDN distribution: CDN management and syncers to CDN.
- [p2004a/spring-rapid-syncer]: Rapid repo syncer from builder host to CDN.
Also includes a prober to for debugging CDN replication issues.
- [p2004a/bar-repos-bunny-replication-lag-mitigation]: Helper to make sure
updates to CDN are pushed in consistent way.
- [p2004a/rapid-pool-init]: Builder for the initial rapid game download.
package.
- [p2004a/springfiles-mirror]: Map CDN: publishing, serving, IaC setup.
- Maps metadata setup
- [maps-metadata]: Main repo that transforms data and distributes to other
places via GitHub actions. Also contains source for a few server side
components of that system.
- Maintenance of [https://rowy.beyondallreason.dev/](https://rowy.beyondallreason.dev/) (deployment with [custom BAR patches](https://github.com/p2004a/rowy/tree/bar-fork)).

## Auxiliary services

- BAR Live services (replays, leaderboard, battles linked as `iframe`s from [www.beyondallreason.info](https://www.beyondallreason.info/)):
- [Jazcash/bar-db]: Backend service, effectively [https://api.bar-rts.com/](https://api.bar-rts.com/)
- [Jazcash/bar-live-services]: Frontend embeded in main website [https://bar-rts.com/](https://bar-rts.com/)
- Teiserver contains some additional functionality in this category:
- Microblog
- Discord bot
- Engine crash logs
- [logs-upload]: Small Cloudflare worker to handle log upload from launcher.
- Main website is created in [Webflow](https://webflow.com/) and not part of BAR
infrastructure.


[Yaribz/SPADS]: https://github.com/Yaribz/SPADS
[spads_config_bar]: https://github.com/beyond-all-reason/spads_config_bar
[ansible-spads-setup]: https://github.com/beyond-all-reason/ansible-spads-setup
[p2004a/recoil-host]: https://github.com/p2004a/recoil-host
[Teiserver]: https://github.com/beyond-all-reason/teiserver
[hailstorm]: https://github.com/beyond-all-reason/hailstorm
[ansible-teiserver]: https://github.com/beyond-all-reason/ansible-teiserver
[tachyon]: https://github.com/beyond-all-reason/tachyon
[BYAR-Chobby]: https://github.com/beyond-all-reason/BYAR-Chobby
[bar-lobby]: https://github.com/beyond-all-reason/bar-lobby
[spring-launcher]: https://github.com/beyond-all-reason/spring-launcher
[pr-downloader]: https://github.com/beyond-all-reason/pr-downloader
[flathub/info.beyondallreason.bar]: https://github.com/flathub/info.beyondallreason.bar
[bar_debug_launcher]: https://github.com/beyond-all-reason/bar_debug_launcher
[RapidTools]: https://github.com/beyond-all-reason/RapidTools
[rapid-hosting]: https://github.com/beyond-all-reason/rapid-hosting
[p2004a/spring-rapid-syncer]: https://github.com/p2004a/spring-rapid-syncer
[p2004a/bar-repos-bunny-replication-lag-mitigation]: https://github.com/p2004a/bar-repos-bunny-replication-lag-mitigation
[p2004a/rapid-pool-init]: https://github.com/p2004a/rapid-pool-init
[p2004a/springfiles-mirror]: https://github.com/p2004a/springfiles-mirror
[maps-metadata]: https://github.com/beyond-all-reason/maps-metadata
[Jazcash/bar-db]: https://github.com/Jazcash/bar-db
[Jazcash/bar-live-services]: https://github.com/Jazcash/bar-live-services
[logs-upload]: https://github.com/beyond-all-reason/logs-upload
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ plugins:
- git-revision-date-localized:
enable_creation_date: true
- search
- callouts
markdown_extensions:
- attr_list
- admonition
- pymdownx.details
- pymdownx.superfences
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mkdocs~=1.6.0
mkdocs-material~=9.5.31
mkdocs-callouts~=1.13.2
mkdocs-git-revision-date-localized-plugin~=1.2.6

0 comments on commit 4b84724

Please sign in to comment.