Our great sponsors
-
Example: I split out all of the logic for reading my program's config file into its own crate. This is great, since only the main binary actually depends on this behavior. All of my database adapters, currency exchanging functions, my schema, etc, don't need any of that to compile. It really helps with reusability and separation of concerns.
-
Also, often when I use a dependency (and if it is viable to do so) I will write helpers around it so that if I change the dependency later, the odds of me having to change everything depending on certain functionality goes down.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Trying to solve this exact issue I always end up with a bunch of modules, each with it's own message processing loop, and using crossbeam or Tokio channels to communicate with each other. Something like this: https://github.com/Asapin/alkonost/blob/master/chat_poller/src/lib.rs