Repository files navigation Sample ledger app using Encore, Temporal and TigerBeetle database
/authorize/:account_id/:amount
Starts a auth workflow
Checks if the account exists and if the amount is available.
Creates a pending transfer. This will reserve the funds for the transfer. TODO: Timeout is not working correctly
Stores the transfer id in redis.
Starts a void workflow
Sleeps for the auth duration which is 10 seconds.
Checks if the transfer is still pending. If it is, it will void the transfer.
/present/:account_id/:amount
Starts a present workflow
Checks if the account exists.
Gets the transfer id from redis.
Checks if the transfer is still pending. If it is, it will present the transfer.
Dockerize the app. Right now it is not possible to run the app without installing the dependencies.
Investigate more on TigerBeetle timeout.
More testing around timing issues. Right now there will be race conditions if the void and present workflows are started at the same time.
Add tests.
Start void as a child workflow instead of a separate workflow.
Move DB queries to a separate service, and probably implement Sagas to coordinate the workflows.
Install all the dependencies. Encore, temporal-lite and TigerBeetle.
Start temporal-lite and TigerBeetle.
Start the app with encore run --debug
Create accounts using account API. Also create a main treasury account which is assumed here to be of id 1234567.
Use authorize and present APIs to test the app.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.