Core implementation for high-performance unique identifiers.
Provides functions for generating and manipulating Flakes - 192-bit identifiers that combine nanosecond timestamps with high-entropy random data to ensure both uniqueness and monotonic ordering properties.
Core implementation for high-performance unique identifiers. Provides functions for generating and manipulating Flakes - 192-bit identifiers that combine nanosecond timestamps with high-entropy random data to ensure both uniqueness and monotonic ordering properties.
High-performance time-ordered unique identifier implementation.
A Flake is a 192-bit identifier combining:
Designed for distributed systems requiring:
Implementation inspired by μ/log (mulog) by Bruno Bonacci: https://github.com/BrunoBonacci/mulog/blob/master/mulog-core/src/com/brunobonacci/mulog/flakes.clj Licensed under Apache License 2.0
High-performance time-ordered unique identifier implementation. A Flake is a 192-bit identifier combining: - 64-bit nanosecond-precision timestamp - 128-bit random component Designed for distributed systems requiring: - Monotonic ordering properties - High collision resistance - Efficient string serialization Implementation inspired by μ/log (mulog) by Bruno Bonacci: https://github.com/BrunoBonacci/mulog/blob/master/mulog-core/src/com/brunobonacci/mulog/flakes.clj Licensed under Apache License 2.0
High-performance time-ordered unique identifiers.
Flakes are 192-bit identifiers designed for distributed systems that need:
Optimized for high-throughput scenarios with thread-local randomization and efficient encoding algorithms.
High-performance time-ordered unique identifiers. Flakes are 192-bit identifiers designed for distributed systems that need: - Guaranteed ordering based on creation time - High entropy for uniqueness - Compact string representation - Fast generation (sub-50ns target) ## Structure - 64 bits: High-precision timestamp (nanosecond resolution) - 128 bits: Cryptographically random data ## Key Properties - **Monotonic**: Later-generated flakes sort after earlier ones - **Order-preserving**: String representations maintain sort order - **URL-safe**: Uses web-safe Base64-variant encoding - **Collision-resistant**: 128 bits of entropy per timestamp ## Performance Optimized for high-throughput scenarios with thread-local randomization and efficient encoding algorithms.
High-precision timestamp provider combining wall clock and monotonic timing.
This implementation anchors to the system wall clock at initialization, then uses monotonic timing to provide nanosecond-precision timestamps that maintain consistent intervals.
Key characteristics:
Note: This is not a high-precision wall clock replacement. While it provides nanosecond granularity, it can drift from true wall time over extended periods as monotonic clocks don't adjust for NTP synchronization.
Timestamp range extends to approximately year 2262 when using nanosecond precision in a long value.
High-precision timestamp provider combining wall clock and monotonic timing. This implementation anchors to the system wall clock at initialization, then uses monotonic timing to provide nanosecond-precision timestamps that maintain consistent intervals. Key characteristics: - Nanosecond resolution for timestamp generation - Monotonic properties within process lifetime - Wall-clock anchored for cross-system compatibility - Single global instance for consistency Note: This is not a high-precision wall clock replacement. While it provides nanosecond granularity, it can drift from true wall time over extended periods as monotonic clocks don't adjust for NTP synchronization. Timestamp range extends to approximately year 2262 when using nanosecond precision in a long value.
Unified interface for unique identifier generation.
This component consolidates UUID (RFC9562) and Flake (192-bit time-ordered) identifier generation into a single namespace.
Use the subnamespace aliases for specific functionality:
uuid/* for UUID operationsflake/* for Flake operationsUnified interface for unique identifier generation. This component consolidates UUID (RFC9562) and Flake (192-bit time-ordered) identifier generation into a single namespace. ## UUID Support - v0-v8: Standard UUID versions following RFC9562 - SQUUID: Sequential UUID for time-ordering ## Flake Support - High-performance 192-bit time-ordered identifiers - Nanosecond precision with 128-bit entropy Use the subnamespace aliases for specific functionality: - `uuid/*` for UUID operations - `flake/*` for Flake operations
Lock-Free, Thread-safe Monotonic Clocks
Lock-Free, Thread-safe Monotonic Clocks
Core UUID generation and manipulation functions implementing RFC 9562.
Provides comprehensive support for all UUID versions (v0-v8) with efficient internal representation and conversion utilities.
Implementation inspired by clj-uuid by Dan Lentz: https://github.com/danlentz/clj-uuid Licensed under Eclipse Public License 1.0
Core UUID generation and manipulation functions implementing RFC 9562. Provides comprehensive support for all UUID versions (v0-v8) with efficient internal representation and conversion utilities. Implementation inspired by clj-uuid by Dan Lentz: https://github.com/danlentz/clj-uuid Licensed under Eclipse Public License 1.0
UUID generation and manipulation utilities following RFC9562.
Supports generation of:
UUID generation and manipulation utilities following RFC9562. Supports generation of: - v0: Null UUID - v1: Time-based UUID - v3: Name-based UUID (MD5) - v4: Random UUID - v5: Name-based UUID (SHA1) - v6: Time-based, lexically sortable UUID - v7: Unix time-based, lexically sortable UUID - v8: Custom UUID - squuid: Sequential UUID (non-standard)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |