Tagged articles
unique identifier
35 articles · Page 1 of 1
The article explains why developers are moving from UUID to ULID, detailing ULID’s 128‑bit compatibility, massive per‑millisecond uniqueness, lexicographic sorting, compact 26‑character Base32 encoding, timestamp integration, strong randomness, and practical use cases such as distributed systems and database sharding.
Base32Distributed Systemstimestamp
0 likes · 3 min read

This article explains PHP's microtime() function, covering its basic concept, syntax with optional boolean parameter, practical code examples for retrieving timestamps as strings or floats, and common applications such as measuring execution time and generating unique identifiers.
PHPPerformance Measurementmicrotime
0 likes · 4 min read

This article explains how to achieve API idempotency by having clients send a short‑lived unique serial number, storing it as a Redis key with SETNX and an expiration, and handling the Redis response to process or reject duplicate requests.
API IdempotencyRedissetnx
0 likes · 3 min read

This article examines common order‑number generation rules and compares four practical solutions—UUID, database auto‑increment, Snowflake algorithm, and Redis INCR—providing code examples and best‑practice recommendations for building globally unique, fast‑producing identifiers in distributed backend systems.
Distributed Systemsorder IDunique identifier
0 likes · 12 min read

Learn the fundamentals of Twitter's Snowflake distributed ID algorithm, its 64‑bit structure, and step‑by‑step PHP implementation—including installation via Composer, basic usage, custom data‑center and worker IDs, start timestamps, Laravel integration, and custom sequence resolvers—to generate globally unique, time‑ordered identifiers.
LaravelPHPSnowflake
0 likes · 6 min read

This article explores how various unique identifier schemes—random UUIDs, sequential numbers, hierarchical paths, and distributed ID generators—are applied across programming languages, file systems, databases, and networks, and explains when and how to enforce uniqueness using pre‑validation, database constraints, or distributed locks such as Redis and Zookeeper, while also linking these mechanisms to CAS‑based concurrency control.
CASDatabase IndexingDistributed Systems
0 likes · 23 min read

This guide examines ten popular distributed ID generation techniques—from simple UUIDs and database auto‑increment keys to advanced Snowflake, Redis, Zookeeper, and open‑source solutions like Baidu uid‑generator, Meituan Leaf, and Didi Tinyid—highlighting their pros, cons, and suitable scenarios for high‑traffic systems.
BackendSnowflakedistributed-id
0 likes · 8 min read

This article explains what a distributed ID is, outlines its essential requirements such as global uniqueness, high performance, high availability, and ease of use, and then reviews common generation strategies—including database auto‑increment, segment mode, NoSQL approaches, UUID, Snowflake, and several open‑source frameworks—providing code examples and practical trade‑offs.
RedisSnowflakeUID generator
0 likes · 23 min read

This article examines the inner workings of Java's java.util.UUID class, detailing how UUID.randomUUID() generates version‑4 UUIDs using SecureRandom, the bitwise adjustments for version and variant fields, and the constructor logic that assembles the final 128‑bit identifier.
BackendJavaSecureRandom
0 likes · 9 min read

ULID (Universally Unique Lexicographically Sortable Identifier) offers a 128‑bit, time‑based and random identifier that is URL‑safe, sortable, and more collision‑resistant than UUID, with detailed specifications, binary layout, and Python usage examples including generation, conversion, and component extraction.
Distributed SystemsPythonUUID alternative
0 likes · 7 min read

This article explains PHP's microtime() function, covering its basic concept, syntax, optional parameters, practical code examples for retrieving timestamps as strings or floats, and common use cases such as measuring execution time and generating unique identifiers.
code executionmicrotimetime handling
0 likes · 5 min read

The article explains why distributed systems need globally unique identifiers, outlines strict generation rules and availability requirements, compares common approaches such as UUID, database auto‑increment and Redis, and provides a detailed overview and Java implementation of Twitter's Snowflake algorithm.
RedisSnowflakedistributed-id
0 likes · 14 min read

This article explains the SnowFlake distributed ID algorithm, detailing its 64‑bit structure, bit allocation for timestamps, datacenter and worker IDs, sequence numbers, and provides a complete Java implementation along with its advantages and limitations.
AlgorithmBackenddistributed-id
0 likes · 10 min read

This article explains what ULID (Universally Unique Lexicographically Sortable Identifier) is, compares it with UUID, details its features, binary layout, and encoding, and provides practical Python examples for generating and manipulating ULIDs in distributed systems.
Pythondatabaseidentifier
0 likes · 7 min read

This article explains what ULID is, why it often outperforms UUID by combining timestamp and randomness for collision‑free, lexicographically sortable identifiers, details its specification, binary layout, encoding, and shows practical Python usage and common application scenarios.
Distributed Systemsulidunique identifier
0 likes · 8 min read

This article explains ULID (Universally Unique Lexicographically Sortable Identifier), compares it with UUID, details its timestamp‑based and random components, lists its features and binary layout, and shows how to generate and use ULIDs in Python for distributed systems.
ulidunique identifieruuid
0 likes · 8 min read

This article explains the need for globally unique identifiers in modern applications, outlines the essential characteristics of a distributed ID generation service, examines common implementation techniques, and discusses concrete business scenarios such as order numbers, coupons, short URLs, and tracing with practical code examples.
BackendPHPcoupon code
0 likes · 18 min read

This article explains ULID (Universally Unique Lexicographically Sortable Identifier), compares it with UUID, outlines its technical specifications, lists its advantages and typical application scenarios, and provides detailed Python examples for generating and manipulating ULIDs.
Distributed SystemsPythonidentifier generation
0 likes · 6 min read

This article explains ULID—a lexicographically sortable, 128‑bit identifier combining timestamp and randomness—detailing its advantages over UUID, specifications, binary layout, common use cases, and provides Python code examples for generating and manipulating ULIDs.
Pythontimestampulid
0 likes · 7 min read

This article analyzes the diverse business requirements for unique identifiers—such as order numbers, QR‑code payments, coupons, trace IDs, and short URLs—and compares technical implementations like Redis auto‑increment, Snowflake, and custom base‑62 encoding to help engineers select the most suitable distributed ID generation solution.
Backend Architecturecoupon codedistributed-id
0 likes · 19 min read

ULID (Universally Unique Lexicographically Sortable Identifier) combines a millisecond-precision timestamp with high-entropy randomness to produce 128‑bit, URL‑safe, lexicographically sortable IDs that avoid UUID’s collision risks, offering advantages such as monotonic ordering, compact Base32 encoding, and suitability for distributed database primary keys.
Distributed SystemsPythonulid
0 likes · 8 min read

This article explains ULID (Universally Unique Lexicographically Sortable Identifier) as a time‑based, collision‑resistant alternative to UUID, outlines its specifications, highlights its advantages, and provides practical Python examples for generating and manipulating ULIDs.
PythonUUID alternativeulid
0 likes · 7 min read

This article explains the need for globally unique, trend‑increasing IDs in distributed systems, evaluates common solutions such as UUIDs, database auto‑increment, Redis counters, and presents a detailed Java implementation of Twitter's Snowflake algorithm with code examples, deployment tips, and a discussion of its advantages and drawbacks.
BackendSnowflakedistributed-id
0 likes · 15 min read

NanoID, a modern alternative to UUID, offers significantly smaller IDs, up to 60% faster generation, stronger security via crypto APIs, customizable alphabets, and broad language support, making it a compelling choice for developers seeking efficient, compact, and secure unique identifiers across various platforms.
JavaScriptSecurityid-generation
0 likes · 8 min read

This article explains how NanoID, a compact and faster alternative to UUID, offers better security, smaller size, higher performance, and broad language support, while also discussing its limitations and future prospects for unique identifier generation in software development.
JavaScriptSecuritynanoid
0 likes · 8 min read

This article explains the Snowflake distributed ID algorithm, compares it with other ID generation methods, details its 64‑bit structure, provides a complete Java implementation with thread‑safe code, and discusses practical limits such as the 69‑year timestamp and front‑end numeric handling.
BackendJavaSnowflake
0 likes · 11 min read

After encountering duplicate order IDs during a system upgrade, the author analyzes the shortcomings of the original timestamp-and-random-based generator, demonstrates concurrency tests revealing collisions, and presents a revised Java implementation using atomic counters, shortened timestamps, and IP suffixes to reliably produce unique order numbers even under high load.
Javaatomicintegerbackend development
0 likes · 9 min read

This article explains the concept of distributed unique identifiers, compares segment‑mode and Snowflake implementations, provides a full Java Snowflake code example, and reviews open‑source solutions such as Meituan Leaf and Baidu UidGenerator, offering guidance on selecting and using these ID generation tools in backend systems.
JavaSnowflakedistributed-id
0 likes · 10 min read

This article explains the need for globally unique identifiers in distributed systems, compares common ID generation schemes such as UUID, auto‑increment, Redis counters, and Snowflake, provides a Java implementation of the Snowflake algorithm, and reviews open‑source components like Meituan Leaf and Baidu UidGenerator.
distributed-idopen-sourcesnowflake-algorithm
0 likes · 12 min read

This article analyzes a real incident where duplicate order numbers were generated under high concurrency, critiques the original timestamp‑based approach, and presents a thread‑safe Java solution using AtomicInteger, Java 8 date formatting, and optional IP suffixes to ensure globally unique identifiers.
Distributed Systemsatomicintegerorder-number
0 likes · 9 min read

This article explains the principles of primary keys, compares auto‑increment IDs and GUIDs, introduces the Snowflake ID structure, discusses its benefits and drawbacks, and provides a complete .NET implementation using Redis for dynamic worker‑ID allocation, including handling clock rollback and code examples.
.NETC++Distributed Systems
0 likes · 17 min read

The article analyzes a real‑world incident where duplicate order IDs were generated under high concurrency, demonstrates the shortcomings of the original Java implementation, and presents a thread‑safe redesign using AtomicInteger, Java 8 date‑time API and container IP suffix to guarantee unique identifiers across parallel requests and clustered instances.
BackendConcurrencyDistributed Systems
0 likes · 11 min read


21CTOAug 12, 2020 · Backend Development
This article explains the challenges of generating globally unique IDs in sharded databases, compares common solutions such as auto‑increment, UUID, Snowflake, and Redis, and presents a practical MySQL‑based design that uses table‑level auto‑increment combined with in‑memory segment allocation to achieve high concurrency, reliability, and performance.
Redisdistributed-idhigh concurrency
0 likes · 9 min read

The article examines a Java method that creates unique transaction order numbers by combining a timestamp with a four‑digit random code, discusses its collision risk, evaluates testing strategies—including stress testing and UUID replacement—and provides sample code for both generation and duplicate detection.
Javaorder-numberunique identifier
0 likes · 6 min read

This article explains the requirements for invitation codes, critiques simple random generation, and presents a custom base‑32 encoding method in Java that guarantees uniqueness, efficiency, and reversibility while allowing easy expansion.
BackendInvitation CodeJava
0 likes · 9 min read
