The Actor Model System with Tokyo is a powerful combination that allows you to build concurrent and parallel systems in Rust without having any external infrastructure such as a database.
This demo presents a simple financial asset exchange system, where concurrent actors submit buy and sell orders to a single order book based on mpsc which stands for "multi-producer, single-consumer", the order book updates its status in consequence with the generation of messages. Additionally, a web server is implemented to expose Prometheus metrics through Autometrics and expose performance information.
cargo run
pin up local Prometheus and start scraping your application that listens on Prometheus.
am start :8080
Explore your request metrics in Autometrics
The recommended installation for macOS is via Homebrew:
brew install autometrics-dev/tap/am
Alternatively, you can download the latest version from the releases page
The easiest way to get up and running with this application is to clone the repo and get a local Prometheus setup using the Autometrics CLI.
Read more about Autometrics in Rust here and general docs here.