GeezerVison is showing github.com — add . · Kileto/Java-Interview-Advanced@843e587
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
232 | 232 | - [56、作业:自己梳理出来ZooKeeper分布式锁的生产问题解决方案](/docs/distributed-system/zookeeper-distribute-lock-scheme.md) |
233 | 233 | - [57、在搭建好的电商系统中,落地开发分布式锁保证库存数据准确的方案](/docs/distributed-system/floor-distribute-lock.md) |
234 | 234 | - [58、你们的分布式锁做过高并发优化吗?能抗下每秒上万并发吗?](/docs/distributed-system/highly-concurrent-distribute-lock.md) |
| 235 | +- [59、淘宝和京东的库存是怎么实现的?能不能不用分布式锁实现高并发库存更新?](/docs/distributed-system/distributed-lock-taobao-and-jingdong.md) |
235 | 236 |
|
236 | 237 |
|
237 | 238 |
|
|
Collapse file
Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | + |
| 2 | +大公司一般有分布式kv存储,tair,redis,mongodb,高并发,每秒几万几十万都没问题,甚至每秒百万 |
| 3 | + |
| 4 | +实时库存数据放kv存储里去,先查库存再扣减库存,你在操作库存的时候,直接扣减,如果你发现扣减之后是负数的话,此时就认为库存超卖了,回滚刚才的扣减,返回提示给用户。对kv做的库存修改写MQ,异步同步落数据库,相当于异步双写,用分布式kv抗高并发,做好一致性方案 |
| 5 | + |
| 6 | + |