Backend internal interview (Rust)
Go to file
jesus fd1ca738ce Update README
Change organization links
2025-01-02 12:41:39 +00:00
.cargo chore: add .cargo and assets for rustdoc build 2024-10-21 03:21:48 +01:00
assets chore: reg_exp example included 2024-10-21 20:39:45 +01:00
src chore: fmt, bound generic for generate_metrics, adjust types to generic, remove some mut and fix tests 2024-10-22 12:46:22 +01:00
.gitignore chore: update .gitignore 2024-10-21 03:20:01 +01:00
ABOUT.md core: add ABOUT for quick verification and notes 2024-10-21 03:26:13 +01:00
Cargo.toml chore: fix comment 2024-10-21 05:08:22 +01:00
CHANGES.md core: update README and CHANGES 2024-10-21 03:25:06 +01:00
config.toml chore: add commented reg_exp example with escape slash 2024-10-21 20:36:43 +01:00
Home-Task_exercise_interview_Rust.pdf Init repo with original content 2024-10-17 15:05:05 +01:00
howto.md chore: reg_exp example included 2024-10-21 20:39:45 +01:00
input_2.txt chore: add second input file input_2.txt for parallel tries 2024-10-21 03:22:56 +01:00
input.txt Init repo with original content 2024-10-17 15:05:05 +01:00
layout.md core: add md files howto layout 2024-10-21 03:25:41 +01:00
LICENSE core: add license file 2024-10-21 03:24:38 +01:00
output_expected.txt Init repo with original content 2024-10-17 15:05:05 +01:00
README.md Update README 2025-01-02 12:41:39 +00:00

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:

  • Use howto for command, options, etc.
  • Build documentation and browse content whit source code (instruction in about)
  • Files layout notes in layout.md

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:

  • Basic fixed one

    A basic code review, fixed with minor and essential changes to work as expected.
    Tests are included for verification.

  • Improve one