{"id":22086226,"url":"https://github.com/probablyclem/transaction-processing-exercice","last_synced_at":"2025-10-25T16:40:49.519Z","repository":{"id":252942373,"uuid":"841857757","full_name":"ProbablyClem/transaction-processing-exercice","owner":"ProbablyClem","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-14T15:52:29.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T05:28:24.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ProbablyClem.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-13T07:22:54.000Z","updated_at":"2024-08-14T15:52:32.000Z","dependencies_parsed_at":"2024-08-13T15:22:06.186Z","dependency_job_id":"f58799a0-b9c0-4557-b816-3caf5d4747f9","html_url":"https://github.com/ProbablyClem/transaction-processing-exercice","commit_stats":null,"previous_names":["probablyclem/transaction-processing-exercice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Ftransaction-processing-exercice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Ftransaction-processing-exercice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Ftransaction-processing-exercice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Ftransaction-processing-exercice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProbablyClem","download_url":"https://codeload.github.com/ProbablyClem/transaction-processing-exercice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175530,"owners_count":20572792,"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":[],"created_at":"2024-12-01T01:22:20.685Z","updated_at":"2025-10-25T16:40:49.434Z","avatar_url":"https://github.com/ProbablyClem.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transaction-processing-exercice\nMade by Clement Guiton\n\n## Toy transaction processing engine\n\nThe engine implements all the required cases : \n- Deposit\n- Withdrawal\n- Dispute\n- Resolve\n- Chargeback\n\n## Usage\nThe program takes the path of the input file as a argument, and outputs the result in the console.\n\n## Tests\nThe code is tested all the way through, and the tests can be run with the following command:\n```bash\ncargo test\n```\n\nTests includes serialization and deserialization of the transactions, file reading, and all the cases of the transaction processing engine.\n\n## Safety\nSince this is a CLI tool, handling financial transactions, we panic on error.\nWe'd rather fail fast and loud than let a bug go unnoticed, and cause corrutped data.\nCases that were documented in the requirements are skipped, for example a dispute on a non-existing transaction.  \nOtherwise we assert business logic constraits with expects throughout the code  [Tiger style](https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md).\n\nSome cases are also handled gracefully, a deposit on a frozen account will be ignored, but we keep it in a separate queue for further processing in case of unlocking.\n\n## Performance\nWe use the tokio async runtime to parse the file and process the transactions concurrently.\nThis allows us to stream through a large file or handle tcp streams.\n\nWe also use a hashmap to store the accounts and a hashmap to store the transactions, which allows us to have a average O(1) complexity for the lookups.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyclem%2Ftransaction-processing-exercice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobablyclem%2Ftransaction-processing-exercice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyclem%2Ftransaction-processing-exercice/lists"}