• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ooToo
V2EX  ›  程序员

AtomicLong 有什么好的分布式实现方式吗? 优缺点是?

  •  
  •   ooToo · Mar 5, 2020 · 2720 views
    This topic created in 2435 days ago, the information mentioned may be changed or developed.
    5 replies  •  2020-03-05 23:04:14 +08:00
    qwerthhusn
    qwerthhusn
    Mar 5, 2020
    1
    Redis 的 INCR
    ooToo
    ooToo
    OP
    Mar 5, 2020
    2
    @qwerthhusn 嗯, 这个知道. 那如果从面试造火箭的角度呢?😂
    Yanickkk
    Yanickkk
    Mar 5, 2020
    3
    大致上都差不多吧,1. 依赖中间件,Leaf,Redis 之类的。2. 不依赖中间件:snowflake
    Yanickkk
    Yanickkk
    Mar 5, 2020
    4
    补充下:严格单调递增只能依赖中间件
    jelipo
    jelipo
    Mar 5, 2020
    5
    能实现分布式锁的中间件都可以
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2993 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 11:46 · PVG 19:46 · LAX 03:46 · JFK 06:46
    ♥ Do have faith in what you're doing.