jacobobryant / biff

A Clojure web framework for solo developers.
https://biffweb.com
MIT License
877 stars 41 forks source link

submit-tx enhancements #128

Closed jacobobryant closed 2 years ago

jacobobryant commented 2 years ago

I've made a few improvements to submit-tx in one of my projects that should be moved into biff. They decompose it into a couple different functions--one for running & retrying an XT transaction, and one for converting a Biff transaction to an XT transaction--and also let you mix Biff transactions with regular XT operations, so you can e.g. use transaction functions. Also instead of submitting a biff transaction, you can submit a function that takes a database value and produces a Biff transaction, and then the function will be called whenever biff tries to re-run the transaction (i.e. if there's contention).