#ulid — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ulid, aggregated by home.social.
-
UUID мертв? Да здравствует Smart ID! Почему ваш проект заслуживает лучшего
В этой статье я поделюсь опытом проектирования идентификаторов для крупной медицинской системы. Мы пройдем путь от простых автоинкрементов до UUID, ULID и в итоге создадим гибридное решение, которое оказалось лучше всех существующих подходов. Спойлер: идеальный ID — это не технология, а архитектура.
-
Discovered an elegant "cheat code" for "Jenny" (Ident-Smith) to preserve full acronyms for our special requirements while maintaining micro-precision sortable IDs. Hybrid-base strings are the way. Identity shouldn't be a black box; it should be a sortable, high-precision map of exactly when and where a process began.
-
ULID, UUIDv4 и UUIDv7 в логах nginx: как сделать поиск по ID быстрым и удобным в ClickHouse
Когда вы работаете с распределённой системой — будь то микросервисы, фронтенд + бэкенд или nginx + приложение — жизненно важно иметь возможность «протянуть» один и тот же идентификатор запроса через все её компоненты. Это позволяет сопоставлять логи из разных источников, быстро находить ошибки и проводить корреляционный анализ. В nginx для этого из коробки есть переменная $request_id — 32-символьный hex-идентификатор (например, a1b2c3d4e5f678901234567890abcdef ). Его можно передать бэкенду через proxy_set_header X-Request-ID $request_id; или fastcgi_param HTTP_X_REQUEST_ID $request_id; , а также сохранить в access-логах. Однако стандартный $request_id — это просто случайная строка без временной привязки и без структуры, удобной для аналитики. В этой статье мы рассмотрим, как улучшить ситуацию с помощью ULID и UUIDv7.
-
I just released the first major update for the ULID unique ID generation library in over 8 years! I’ve been following it as a user for years, having even forked it for ulidx when it wasn’t being maintained. It’s fulfilling to not only see it updated (as I use it a lot), but having done so myself.
If you’re building a new feature and are about to reach for an ID generator (like UUID), you might consider trying ULIDs instead: https://github.com/ulid/javascript
-
"A few secure, random bytes without `pgcrypto`" 🔮
Generating a ULID using a roundabout way to avoid a dependency on the pgcrypto extension used just to get `gen_random_bytes()`
https://brandur.org/fragments/secure-bytes-without-pgcrypto
By @brandur
#PostgreSQL #Postgres #PGcrypto #UUID #ULID #Random #Bytes #SQL
-
there seems to be a lot of excitement for #uuidV7 these days (timestamp-based). it's very cool, and a good choice if you're using the #uuid or #guid as a database key (to avoid fragmentation)
https://ntietz.com/blog/til-uses-for-the-different-uuid-versions/
i also really like #ulid for this, and they can be converted to uuids/guids easily and quickly.
one thing i don't see many people talk about when they move to monotonically incrementing ids (like v7/ulid) is this: if you have a distributed database you will end up with poor balancing with these ids. not what most people do, i guess, but it's something to think about. -
Your preferred method for generating unique identifiers in a medium to large distributed system?
-
I made a common #lisp implementation of #ULID. ULIDS are neat, they're like UUIDs but sequentially ordered. I wanted to use ULID to make a different thing thing with, but I couldn't find any useful lisp ones. #procrastination #code
https://gitlab.com/colinstrickland/cms-ulid/
(I subsequently found some other implementations, because I'm bad at googling things, but I had fun making it I barely get to write any code these days, and it probably shows!)