Hlc
The Hlc
type is a string that represents a Hybrid Logical Clock (HLC) value.
string
HLCs are used to provide a globally unique timestamp that can be used to order events across distributed systems. The Hlc
type in TinyBase is a sortable 16 character string that encodes a timestamp, a counter, and the hash of a unique client identifier.
- 42 bits (7 chars) for the time in milliseconds (~139 years).
- 24 bits (4 chars) for the counter (~16 million).
- 30 bits (5 chars) for the hash of unique client id (~1 billion).
Since
v6.2.0