{"id":19521803,"url":"https://github.com/smarttoolfactory/transactional-key-value-store","last_synced_at":"2025-06-17T03:06:07.918Z","repository":{"id":109487490,"uuid":"600824511","full_name":"SmartToolFactory/Transactional-Key-Value-Store","owner":"SmartToolFactory","description":"Transactional Key Value Store written with Jetpack Compose","archived":false,"fork":false,"pushed_at":"2023-02-19T20:09:03.000Z","size":159,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-04-26T09:35:09.084Z","etag":null,"topics":["android","jetpack-compose","room-database","transactional-database","transactional-memory"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/SmartToolFactory.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":"2023-02-12T17:55:43.000Z","updated_at":"2024-05-23T19:40:59.000Z","dependencies_parsed_at":"2023-04-17T06:32:44.433Z","dependency_job_id":null,"html_url":"https://github.com/SmartToolFactory/Transactional-Key-Value-Store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SmartToolFactory/Transactional-Key-Value-Store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FTransactional-Key-Value-Store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FTransactional-Key-Value-Store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FTransactional-Key-Value-Store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FTransactional-Key-Value-Store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmartToolFactory","download_url":"https://codeload.github.com/SmartToolFactory/Transactional-Key-Value-Store/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartToolFactory%2FTransactional-Key-Value-Store/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260281564,"owners_count":22985627,"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":["android","jetpack-compose","room-database","transactional-database","transactional-memory"],"created_at":"2024-11-11T00:35:00.476Z","updated_at":"2025-06-17T03:06:07.896Z","avatar_url":"https://github.com/SmartToolFactory.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compose Transactional Key-Value Store\n\nA transactional key-value store Sample written with Jetpack Compose with Room database \nto store commits.\n\n\n\nhttps://user-images.githubusercontent.com/35650605/218341574-3b914472-a391-4194-a271-d0e54c1b9845.mp4\n\n\n\n## Tech Stack\n* Jetpack Compose\n* Dagger Hilt\n* Room Database for persisting COMMIT transactions\n* MVVM and clean architecture\n* Unit and Database Tests(More tests to be written)\n\n## Assignment\n\nThe assignment is to build an interactive command line interface to a transactional key value store. A user should be able to compile and run this program and get an interactive shell with a prompt where they can type commands. The user can enter commands to set/get/delete key/value pairs and count values. All values can be treated as strings, no need to differentiate by type. The key/value data only needs to exist in memory for the session, it does not need to be written to disk.\n\nThe interface should also allow the user to perform operations in transactions, which allows the user to commit or roll back their changes to the key value store. That includes the ability to nest transactions and roll back and commit within nested transactions. The solution shouldn’t depend on any third party libraries. The interface should support the following commands:\n\n```\nSET \u003ckey1\u003e \u003cvalue1\u003e \u003ckey2\u003e \u003cvalue2\u003e // store the value for key\nGET \u003ckey\u003e         // return the current value for key\nDELETE \u003ckey1\u003e \u003ckey2\u003e      // remove the entry for key\nCOUNT \u003cvalue\u003e     // return the number of keys that have the given value\nBEGIN             // start a new transaction\nCOMMIT            // complete the current transaction\nROLLBACK          // revert to state prior to BEGIN call\n```\n\n### Set and get a value:\n```\n\u003e SET foo 123\n\u003e GET foo\n123\n```\n\n### Delete a value\n```\n\u003e DELETE foo\n\u003e GET foo\nkey not set\n```\n\n### Count the number of occurrences of a value\n```\n\u003e SET foo 123\n\u003e SET bar 456\n\u003e SET baz 123\n\u003e COUNT 123\n2\n\u003e COUNT 456\n1\n```\n\n### Commit a transaction\n```\n\u003e BEGIN\n\u003e SET foo 456\n\u003e COMMIT\n\u003e ROLLBACK\nno transaction\n\u003e GET foo\n456\n```\n\n### Rollback a transaction\n```\n\u003e SET foo 123\n\u003e SET bar abc\n\u003e BEGIN\n\u003e SET foo 456\n\u003e GET foo\n456\n\u003e SET bar def\n\u003e GET bar\ndef\n\u003e ROLLBACK\n\u003e GET foo\n123\n\u003e GET bar\nabc\n\u003e COMMIT\nno transaction\n```\n\n### Nested transactions\n```\n\u003e SET foo 123\n\u003e SET bar 456\n\u003e BEGIN\n\u003e SET foo 456\n\u003e BEGIN\n\u003e COUNT 456\n2\n\u003e GET foo\n456\n\u003e SET foo 789\n\u003e GET foo\n789\n\u003e ROLLBACK\n\u003e GET foo\n456\n\u003e DELETE foo\n\u003e GET foo\nkey not set\n\u003e ROLLBACK\n\u003e GET foo\n123\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarttoolfactory%2Ftransactional-key-value-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmarttoolfactory%2Ftransactional-key-value-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmarttoolfactory%2Ftransactional-key-value-store/lists"}