Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because the post is just rambling without a clear intent or direction. Why do you need "oversell protection" if you have "transactions". Isn't the whole point of a "transaction" that it handles concurrency and disk failures?


I work with Shopify often and the whole oversell protection thing is like a huge joke.

Oversell happens because Shopify doesn't decrement inventory until payment is confirmed. And they apparently would rather die than change that invariant.


It's funny the organizational rules that get written into a company's DNA.

I could see a historical moment where Shopify, sans that invariant, massively fucked up inventory counts from uncompleted transactions... then had to unwind all that when a bunch failed to clear payment.

Ergo, now there's an invariant.


Would a retail business want the inventory to decrement just because users put items into carts that get abandoned? Seems like that would really mess things up more in the long run.


I know this would add complexity, but I wonder if they could train a model to predict the odds of a given cart being abandoned. I'm a data scientist. I bet there are at least a few situations where you could be confident that someone was going to complete a sale.

Yes. You decrement for a few minutes then release if there's no purchase in time. Airlines figured out how to do this a very long time ago.


Except airlines, literally oversell flights all the time, and the context of my response was to preventing oversale.


An unconfirmed payment might also refer to a credit card charge that is 99% guaranteed to go through but hasn’t completed yet




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: