https://github.com/manfred/sole
Universally unique identifiers packed with useful metadata meant for use if storage solutions.
https://github.com/manfred/sole
Last synced: 11 months ago
JSON representation
Universally unique identifiers packed with useful metadata meant for use if storage solutions.
- Host: GitHub
- URL: https://github.com/manfred/sole
- Owner: Manfred
- License: mit
- Created: 2018-03-10T08:04:50.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-10-07T14:58:30.000Z (over 3 years ago)
- Last Synced: 2025-04-05T03:26:21.655Z (over 1 year ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sole
Sole helps with generating unique identifiers similar to a UUID or ULID but packing in additional metadata to make it useful for storage solutions.
```ruby
Sole.generate #=> 'VGPCCCCC4FPF97MM'
# ^^^^^^^^- seconds since epoch
# little endian order
# to help sharding
# ^^^^^^^^- random bytes
```
Sole identifiers work great as a key for AWS S3 keys because the start of the identifier is highly variable causing objects to be nicely distributed across backend servers.