Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwinchester committed Apr 18, 2024
1 parent 435b4d0 commit 832cd89
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@

UUIDv7 for Elixir and (optionally) Ecto, using an 18-bit randomly-seeded counter.

There are other UUID v7 packages, but I wanted the additional precision.

Uses suggestions described in **[Section 6.2](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-monotonicity-and-counters)**
from [this IETF Draft](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html)
Uses suggestions described in **[Section 6.2](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-monotonicity-and-counters)** from [this IETF Draft](https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html)
to add additional sort precision to a version 7 UUID.

## When should I use this package?

- You want sequential, time-based, ordered IDs (per-node).
- You are willing to trade a small amount of raw performance for these
guarantees. You are taking a hit for backwards time-leap protection and the
counter with rollover protection.

## When should I not use this package?

- You don't care about sort/order precision beyond milliseconds.

There are other UUID packages, that only have millisecond precision, for example:

- [martinthenth/uuidv7](https://github.com/martinthenth/uuidv7)
- [bitwalker/uniq](https://github.com/bitwalker/uniq)

## Installation

The package can be installed by adding `uuid_v7` to your list of dependencies in `mix.exs`:
Expand Down

0 comments on commit 832cd89

Please sign in to comment.