UUID мертв? Да здравствует Smart ID! Почему ваш проект заслуживает лучшего

В этой статье я поделюсь опытом проектирования идентификаторов для крупной медицинской системы. Мы пройдем путь от простых автоинкрементов до UUID, ULID и в итоге создадим гибридное решение, которое оказалось лучше всех существующих подходов. Спойлер: идеальный ID — это не технология, а архитектура.

https://habr.com/ru/articles/1040334/

#UUID #SmartId #ULID

UUID мертв? Да здравствует Smart ID! Почему ваш проект заслуживает лучшего

В этой статье я поделюсь опытом проектирования идентификаторов для крупной медицинской системы. Мы пройдем путь от простых автоинкрементов до UUID, ULID и в итоге создадим гибридное решение, которое...

Хабр

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.

#Backend #Coding #ULID #Logic #SoftwareEngineering

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.

https://habr.com/ru/articles/960266/

#clickhouse #nginx #uuid #uuidv7 #uuidv4 #ulid #logs

ULID, UUIDv4 и UUIDv7 в логах nginx: как сделать поиск по ID быстрым и удобным в ClickHouse

Зачем нужны ID запросов в логах? Когда вы работаете с распределённой системой — будь то микросервисы, фронтенд + бэкенд или nginx + приложение — жизненно важно иметь возможность «протянуть» один и тот...

Хабр

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

#ulid #uuid #javascript #typescript #library #foss #oss

GitHub - ulid/javascript: Universally Unique Lexicographically Sortable Identifier

Universally Unique Lexicographically Sortable Identifier - ulid/javascript

GitHub

Here's a throwback! Learn all about UUIDs in this classic article by Starr Horne.

https://www.honeybadger.io/blog/uuids-and-ulids/?utm_source=mastodon&utm_medium=social

#Ruby #RubyOnRails #UUID #ULID

Going deep on UUIDs and ULIDs

Dig into this article to learn about ULIDs vs UUIDs. We explore the tradeoffs and advantages of each option over sequential IDs.

Honeybadger Developer Blog

"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

A few secure, random bytes without `pgcrypto` — brandur.org

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.
TIL: 8 versions of UUID and when to use them | nicole@web

Just discovered : #ziolmdb next & previous operations also work with any identifiers even not in use ones, #lmdb will just peek the nearest one ! As https://github.com/dacr/sotohp #sotohp is using #ULID (time based) I'll get instant move to any date for free :) Going to add a #javafx #scalafx time navigate UI component
GitHub - dacr/sotohp: Photos management

Photos management. Contribute to dacr/sotohp development by creating an account on GitHub.

GitHub
#ZIOLMDB 1.5.0 for #Scala #ZIO is available. With collection head/prev/next/last operations which take advantages of #LMDB lexicographically sorted keys :) Very useful when using #ULID identifiers !
#zioscala - https://github.com/dacr/zio-lmdb
GitHub - dacr/zio-lmdb: Lightning Memory Database (LMDB) for scala ZIO

Lightning Memory Database (LMDB) for scala ZIO . Contribute to dacr/zio-lmdb development by creating an account on GitHub.

GitHub

Been fiddling with #ULID as a direct replacement to #UUID. At least on database use cases where UUID was already in use. Seems saner. Can potentially help with sorting the keys.

https://github.com/ulid/spec

GitHub - ulid/spec: The canonical spec for ulid

The canonical spec for ulid. Contribute to ulid/spec development by creating an account on GitHub.

GitHub