{"id":21247695,"url":"https://github.com/jasterv/transactions-processor","last_synced_at":"2025-03-15T05:15:46.869Z","repository":{"id":38198149,"uuid":"389419109","full_name":"JasterV/transactions-processor","owner":"JasterV","description":"Process CSV data representing account transactions and display the accounts data","archived":false,"fork":false,"pushed_at":"2022-06-09T10:07:34.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-07T21:32:58.763Z","etag":null,"topics":["actor-model","actor-system","async","asynchronous-programming","multithreading","tokio","tokio-rs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JasterV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-25T18:49:21.000Z","updated_at":"2021-10-12T08:36:41.000Z","dependencies_parsed_at":"2022-08-18T18:10:30.752Z","dependency_job_id":null,"html_url":"https://github.com/JasterV/transactions-processor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasterV%2Ftransactions-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasterV%2Ftransactions-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasterV%2Ftransactions-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasterV%2Ftransactions-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JasterV","download_url":"https://codeload.github.com/JasterV/transactions-processor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243685587,"owners_count":20330983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actor-model","actor-system","async","asynchronous-programming","multithreading","tokio","tokio-rs"],"created_at":"2024-11-21T02:42:26.599Z","updated_at":"2025-03-15T05:15:46.850Z","avatar_url":"https://github.com/JasterV.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transactions processor\n\n\u003e Process CSV data representing account transactions and display the accounts\n\u003e data\n\n## Dependencies\n\n- **tokio \u0026\u0026 tokio_stream**: Async runtime that allows us to solve the problem\n  using concurrency and streams\n- **csv_async**: Thanks to tokio_stream and this library we can read the CSV\n  files using streams instead of writting the entire CSV on memory\n- **serde**: This library offers an awesome api to easily convert strings to\n  structured data.\n- **thiserror \u0026 anyhow**: I like to use this libraries to handle errors on a\n  cleaner way.\n- **async-trait**: Since we implement the AsyncActor trait we need to use this\n  library so rust can compile traits using async methods\n\n## Architecture\n\nThis project is based on the\n[Actor Model](https://www.brianstorti.com/the-actor-model/).\n\n- Each actor run on its own thread (tokio tasks in this case)\n- Actors do not share state\n- Actors just receive messages and react to it\n- Each actor has a mailbox (queue) from which it reads the messages in order.\n\n### TxProcessor actor\n\nThis actor is responsible for processing `Transaction` objects, spawn new\nAccount actors if needed and send messages to them telling to perform any\naction.\n\n### Account actor\n\nThis actor is responsible for managing an `Account` object and a map of the\ntransactions done on that account.\n\n![architecture diagram](assets/arch_diagram.jpg)\n\n### Why this architecture?\n\nThe Actors model offers a simple, clean and scalable way of building concurrent\nsystems. Because each actor owns its own resources without sharing it to the\noutside world there is no need to use common concurrent techniques such as Locks\nand it ensures to not have data races.\n\n## Author\n\nVíctor Martínez \u003cjaster.victor@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasterv%2Ftransactions-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasterv%2Ftransactions-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasterv%2Ftransactions-processor/lists"}