Skip to content

create an actor that keeps track of the orders so that we do not exceed our budget threshold.

Notifications You must be signed in to change notification settings

FMFigueroa/actor-model-system-in-tokio

Repository files navigation

Actor Model System in Tokio and Instrumented with Autometrics

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.

About

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.

Local Observability Development

Terminal 1 - To run program.

cargo run

pin up local Prometheus and start scraping your application that listens on Prometheus.

Terminal 2 - To run Autometrics (see pre requirements).

am start :8080

Explore your request metrics in Autometrics


Pre Requirements

Install the Autometrics CLI

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.

About

create an actor that keeps track of the orders so that we do not exceed our budget threshold.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published