V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ooToo
V2EX  ›  程序员

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

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