|
|
|
|
|
by nathanmarz
898 days ago
|
|
This is the bank transfer example we show in rama-demo-gallery. There's both Java and Clojure versions of that example. https://github.com/redplanetlabs/rama-demo-gallery The atomic bank transfer is done as part of function(data). The data record contains fromAccountId, toAccountId, and amount. The function applies the transfer if it's valid (fromAccountId has at least that amount of funds), and no-ops otherwise. |
|
It seems that you cannot, in one database call, make a transaction?
You would need to push your transfer to the depot, then poll until it has been accepted.
If you do not poll, then your transaction may be written but as a no-op.
Does this increase latency for such applications?