On mocking your database transaction: I was there, and on behalf of an LLM I reasoned with, I refactored that bit out to be an actor that carries the transaction, and passing messages (alongside a oneshot channel for return value). The benefit isn’t just that you’re not managing a transaction, but also that you don’t need to coordinate the transaction between multiple async paths where lifetimes and ownership really blow up!
I didn’t use an actor framework, for better or worse, but rolled my own.
I didn’t use an actor framework, for better or worse, but rolled my own.
Great write up!