|
||
---|---|---|
.cargo | ||
assets | ||
src | ||
.gitignore | ||
ABOUT.md | ||
Cargo.toml | ||
CHANGES.md | ||
config.toml | ||
Home-Task_exercise_interview_Rust.pdf | ||
howto.md | ||
input_2.txt | ||
input.txt | ||
layout.md | ||
LICENSE | ||
output_expected.txt | ||
README.md |
Backend internal interview (rust) - improved
This Improved branch is a rather disruptive approach to the initial proposal
Branch basic-fixed tried to solve proposal from initial code
as a continuity effort with the necessary changes and some improvement adjustments such as the parallel input processing
Note
A full refactoring done for better quality, maintenance and readability. (Structs, implementaitions, settings for multiple inputs, etc).
It is able to process multiple metrics in parallel.
In summary
- Define a basic model, easily to extend and modify. Abstraction / Generic.
- Structs and implementations to specific metricis traitments. Modular appoach.
- Settings and configuration for interactive and non interactive processing (batch mode) Customize on context.
See main changes
Important
Use ABOUT content for quick Verification (it requires download and build)
Benefits
Elements items come from main changes
Element | Benefit |
---|---|
Generic traits | Group generic task for metric processing, steps / tasks separation |
Structs | Customize atributes and implementation for specific target or patterns |
Enums with values | Associate attributes metrics and values, easy to add new attributes or combine with different values at once |
Vectors | Simplify types / grouped in structs, priorize vectors type, easy to iterate, filter, sort, etc |
Const and Config | Group main const, define metric targes and operations in declarative mode for non intective traitment |
Command line args | Help to run in terminal as a cli |
Unit Tests | Verify some operations results |
Tip
After download repository and build:
Ideas not included
- Async I/O to scale and performance ?
- Other Thread alternatives like Tokio or/and Coroutines
- Benchmarking for optimization
- More tests
- Run as API mode not only as batch processing
Note
Code is in a private repository with several other branches.
Link to branch repository improved
Home Task exercise description
There are several branches developed as proposal:
-
A basic code review, fixed with minor and essential changes to work as expected.
Tests are included for verification.