port bot to rust, upgrade response, and cut away some of the tf cruft

This commit is contained in:
41666 2022-02-06 19:16:08 -05:00
parent 0a37eff047
commit f5fb729ce7
17 changed files with 1440 additions and 205 deletions

19
packages/bot/README.md Normal file
View file

@ -0,0 +1,19 @@
# Roleypoly Mention Responder
This is written in Rust.
You'll need:
- The rust toolchain (cargo, rust, etc)
...and nothing else.
## Premise of why Rust
Node.js is slow. It's fast enough for 90% of what we want to do, but due to the slowness and memory constraints we'd like to utilize, something else, particularly one designed for extreme multiprocessing (like Rust or Go) is infinitely better. More threads, more memory control (e.g. we can GC the majority of incoming info before we care about it), just better.
This was a very simple Node.js app, but it just couldn't be used with the production workload.
Roleypoly Legacy was running a Go-based bot that worked extremely well, and this iteration's de-evolution back to JS didn't end up working.
**tl;dr:** this piece of shit only responds to mentions. it has no real logic. it shouldn't take a $45/m cloud server to run it.