• Home
  • Archives
  • Future Topics
  swdev.online
  • Home
  • Archives
  • Future Topics
  • Server and RPC
  • Commands and Tools
  • Languages
  • Storage System
  • System Design

An upward trend ID generation service

  • 1. First question - why do we need a sequential ID instead of a random UUID?
    • 1.1 2nd Question is why do I write this article.
  • 2. Requirement:
  • 3. Solution 1: DB atomic update
    • 3.1 IDGenerator service logic
    • 3.2 DB schema
    • 3.3 How to query (MySQL example)
      • 3.3.1 Atomic Read and Update / Transaction
      • 3.3.2 Optimistic Lock / Lockless
    • 3.4 Assessment
  • 4. Solution2: Redis INCRBY
    • 4.1 The logic is the same.
    • 4.2 Assessment
  • 5. Solution3: Time-based on-host generation.
    • 5.1 128 bit UUID
    • 5.2 64 bit SnowFlake Id
    • 5.3 Problem
  • 6. Conclusion
Read more   07/04/2020 posted in  System Design

Design Twitter - 1: Requirement and Storage Selection

  • 1. Requirement
    • 1.1 Use Case
    • 1.2 Volume
  • 2. API
  • 3. Storage Choice
    • 3.1 RDBMS
    • 3.2 NoSQL
Read more   11/09/2019 posted in  System Design

swdev.online

A blog on software development and distributed system components.
GitHub RSS

Categories

Server and RPC Commands and Tools Languages Storage System System Design

Recent Posts

  • Manage Dependencies for a Python Service
  • SSH Tunneling Example
  • Reading Dubbo Source Code - 1. Setup the Environment and Run Demo
  • An upward trend ID generation service
  • Idempotency of a PUT Request

© 2020 Powered by MWeb,  Hosted on GitHub Pages.