scalable and fast unofficial osu! server implementation

Overview

gamma!

the new bancho server for theta! built for scalability and speed

configuration

configuration is done either through gamma.toml, or through environment variables. see gamma.toml.example for the available fields, and src/settings.rs / rustdoc for the environment variable names.

docker

you can build a docker image using nix build .#docker, then load it into docker with docker load < result.

development

you can use the docker-compose.dev.yml to set up the required other services, then copy gamma.toml.example to gamma.toml. you can then cargo run, or use nix run / nix build .#gamma

proxying traffic

you can change the domain that osu uses by passing it the -devserver argument. it will then access several subdomains of that base, which you should set via dns or via /etc/hosts. eg for -devserver localhost, it will try:

  • a.localhost
  • b.localhost
  • c.localhost
  • c[1-7].localhost
  • ce.localhost
  • osu.localhost

as well as this, osu's security is kinda bad - it forces you to use tls 1.0, which most server software really doesn't want you to do. debian, nix, and arch's nginx packages all seem to be built without support for this.

locally, you can use mitmproxy (which nix installs for you): ie sudo ./scripts/proxy.sh. this does change certain headers, etc it shouldn't, but it will work for the most part. you will also need to import the CA that it auto generates in ~/.mitmproxy/mitmproxy-ca-cert.pem.

for deployment, you'll need to run a proper reverse proxy set to support tlsv1.

telemetry / tracing

we use the tracing crate for instrumentation. by default the console output is in a human-friendly format that shows nested spans using indentation.

this can also be exported to any OTLP collector (such as the opentelemetry collector) to visualise and create metrics from it. you can control where this is sent via the config path telem.endpoint, which should be a gRPC endpoint. docker-compose.dev.yml will start a grafana (localhost:3000) and tempo server which lets you query these traces and events, with gamma.toml.example shipping to it automatically.

in deployment, you should set up tempo/grafana properly and likely use the grafana agent or another collector to also create loki logs from the spans.

You might also like...
A fast, safe and easy to use reinforcement learning framework in Rust.
A fast, safe and easy to use reinforcement learning framework in Rust.

RSRL (api) Reinforcement learning should be fast, safe and easy to use. Overview rsrl provides generic constructs for reinforcement learning (RL) expe

K-dimensional tree in Rust for fast geospatial indexing and lookup

kdtree K-dimensional tree in Rust for fast geospatial indexing and nearest neighbors lookup Crate Documentation Usage Benchmark License Usage Add kdtr

Fast, accessible and privacy friendly AI deployment
Fast, accessible and privacy friendly AI deployment

Mithril Security - BlindAI Website | LinkedIn | Blog | Twitter | Documentation | Discord Fast, accessible and privacy friendly AI deployment 🚀 🔒 Bli

A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.
A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.

SDF Viewer (demo below) A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library. A Signed Distance Fu

Rust implementation of real-coded GA for solving optimization problems and training of neural networks
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

A real-time implementation of
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

A neural network, and tensor dynamic automatic differentiation implementation for Rust.

Corgi A neural network, and tensor dynamic automatic differentiation implementation for Rust. BLAS The BLAS feature can be enabled, and requires CBLAS

Command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing.

BDSP RNG Reference This is a command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing. Building Bui

This repository features a simple Kalman filter and RTS smoother (KFS) implementation in Rust by using the ndarray library.
This repository features a simple Kalman filter and RTS smoother (KFS) implementation in Rust by using the ndarray library.

Kalman filter and RTS smoother in Rust (ndarray) This repository features a simple Kalman filter and RTS smoother (KFS) implementation in Rust by usin

Comments
  • refactor: serialization

    refactor: serialization

    added general type parameter b to trait definitions, and constrained it to implement ByteSlice and GrowableBytesSlice traits modified return types of get_bool, get_uleb, get_string and with_header to return a Result type instead of a bare value, this allows the caller to handle cases where an error may occur (e.g. incorrect or insufficient data passed ot buffer) more elegantly

    modified the return type of take_while to return a splice of the original buffer instead of copying, used split_to to split the Bytes value into two parts at the desired position, and returned the first part added an early return if the buffer has no data/is empty, to avoid unnecessary processing

    among other things, added error handling etc etc u get the idea

    let me know if this is suitable and make edits if you need to thanks

    opened by 0i8 8
  • WIP: Boilerplatey stuff

    WIP: Boilerplatey stuff

    • Add tracing and some other related crates for logging and profiling.
    • Add config for loading config from environment and file (mostly convenience)
    • Add docker-compose.dev.yml file and nix configuration, incl building docker image using nix
    • Switch to async redis/deadpool_redis and sqlx instead of sync
    • Add opentelemetry exporter so trace information can be viewed in grafana
    • Add a RequestError type that can be used to represent internal/external errors instead of panicking.
    • Add instructions on how to set up proxy for development
    • Fix some clippy lints

    The resulting telemetry (in debug mode) looks like this in grafana:

    image image

    opened by tcmal 1
Owner
null
Instance Distance is a fast pure-Rust implementation of the Hierarchical Navigable Small Worlds paper

Fast approximate nearest neighbor searching in Rust, based on HNSW index

Instant Domain Search, Inc. 135 Dec 24, 2022
Orkhon: ML Inference Framework and Server Runtime

Orkhon: ML Inference Framework and Server Runtime Latest Release License Build Status Downloads Gitter What is it? Orkhon is Rust framework for Machin

Theo M. Bulut 129 Dec 21, 2022
Network-agnostic, high-level game networking library for client-side prediction and server reconciliation.

WARNING: This crate currently depends on nightly rust unstable and incomplete features. crystalorb Network-agnostic, high-level game networking librar

Ernest Wong 175 Dec 31, 2022
🧠 Motörhead is a memory and information retrieval server for LLMs.

Motörhead Motörhead is a memory and information retrieval server for LLMs. Why use Motörhead? When building chat applications using LLMs, memory handl

Metal 56 Apr 6, 2023
MesaTEE GBDT-RS : a fast and secure GBDT library, supporting TEEs such as Intel SGX and ARM TrustZone

MesaTEE GBDT-RS : a fast and secure GBDT library, supporting TEEs such as Intel SGX and ARM TrustZone MesaTEE GBDT-RS is a gradient boost decision tre

MesaLock Linux 179 Nov 18, 2022
Ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust.

Ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust.

Riccardo D'Ambrosio 2.1k Jan 5, 2023
Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.

The Rust CUDA Project An ecosystem of libraries and tools for writing and executing extremely fast GPU code fully in Rust Guide | Getting Started | Fe

Rust GPU 2.1k Dec 30, 2022
Robust and Fast tokenizations alignment library for Rust and Python

Robust and Fast tokenizations alignment library for Rust and Python

Yohei Tamura 14 Dec 10, 2022
A Demo server serving Bert through ONNX with GPU written in Rust with <3

Demo BERT ONNX server written in rust This demo showcase the use of onnxruntime-rs on BERT with a GPU on CUDA 11 served by actix-web and tokenized wit

Xavier Tao 28 Jan 1, 2023
💥 Fast State-of-the-Art Tokenizers optimized for Research and Production

Provides an implementation of today's most used tokenizers, with a focus on performance and versatility. Main features: Train new vocabularies and tok

Hugging Face 6.2k Jan 2, 2023