/regatta

Server software for conducting virtual ergometer regattas.

Primary LanguageGo

logo

Server software for conducting virtual ergometer regattas.

INSTALLATION

TERMINAL USER INTERFACE

future release

rui is a terminal user interface into Regatta that can be installed separately.

%> ...

You can attach to any running Regatta instance you control:

%> rui <user>:<password>@<uri>

DEVELOPMENT

We use the gorilla toolkit with JSON-RPC and Cassandra. Run the server in development mode:

%> go run ./cmd/server

PHILOSOPHY

STRUCTURE

BUILDS

We use mage.

CASSANDRA

Start a local Cassandra instance:

%> docker run --name cassandra -p 9042:9042 -d cassandra:latest

Access the instance:

%> docker exec -it cassandra cqlsh

Create the keyspace:

CREATE KEYSPACE regatta WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};

MIGRATIONS

We use journey. Raw migration commands:

%> journey --url cassandra://127.0.0.1:9042/regatta --path ./internal/migrations migrate create my_migration
%> journey --url cassandra://127.0.0.1:9042/regatta --path ./internal/migrations migrate up

The Mage equivalents executed from /internal/build:

%> MIGRATION=my_migration mage migrate:create
%> mage migrate:up

WEBSOCKETS

You can use any websocket client. We use websocat.

%> wget https://github.com/vi/websocat/releases/download/v1.5.0/websocat_1.5.0_ssl1.1_amd64.deb
%> sudo dpkg -i websocat_1.5.0_ssl1.1_amd64.deb

Get updates from a regatta by id:

%> websocat ws://127.0.0.1:9999/results/regatta/123