https://github.com/schell/potency
Rust durability and synchronization engine
https://github.com/schell/potency
Last synced: 10 months ago
JSON representation
Rust durability and synchronization engine
- Host: GitHub
- URL: https://github.com/schell/potency
- Owner: schell
- Created: 2025-04-06T21:05:51.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-04-08T02:22:33.000Z (11 months ago)
- Last Synced: 2025-04-30T16:53:31.604Z (10 months ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# potency
`potency` is a bare-bones durability and synchronization library meant to aid in writing idempotent processes without having to think too much.
For some background on durability, check out:
https://flawless.dev/docs/
The idea is roughly that the results of certain "expensive" and fallible processes are cached with a key known by your code, based on namespaces and input parameters.
Before running an expensive fallible process, the cache is queried by this known key and if the cache is hit, the result is read out of the cache instead of being computed.
`potency` offers some type-level machinery to abstract over multiple persistance layers as well as support for multi-colored functions (sync and async). Keep in mind the
runtime itself is asynchronous, but sync functions can be used as the "process".
## goals
* replace bespoke persistance and idempontency processes with `potency`+ your raw operations
* cache/storage support for
- [x] in memory
- [x] sqlite
- [ ] AWS Dynamo DB
- [ ] Postgres
* [ ] replicate / sync storages
* multi-color support
- [x] sync
- [x] async
* [ ] easy key generation