3 ms·
I understand each solution has trade-offs, but I've traditionally done this with an in-db proc (we used stored procedures extensively on Wall Street for txns).
by TuringNYC 5y ago
I understand each solution has trade-offs, but I've traditionally done this with an in-db proc (we used stored procedures extensively on Wall Street for txns). How does this compare against having the entire transaction functionality inside the DB?
- mirekrusin 5y agoTradeoff is that it has very poor performance for frequently changed data, you can starve clients etc. It's much better to create transfer api which atomically debits one and credits other account instead of low level individual ops.
- abraae 5y agoUsing stored procedures is old fashioned and won't earn you any points on your resume if you're being interviewed by 20 year olds. It's a solid solution though unless you are at FAANG volumes.