home.social

#ulid — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #ulid, aggregated by home.social.

  1. 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

  2. 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.

    habr.com/ru/articles/960266/

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

  3. 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: github.com/ulid/javascript

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

  4. "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()`

    brandur.org/fragments/secure-b

    By @brandur

  5. 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.

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

    github.com/ulid/spec

  7. BTW, the U in #ULID is inaccurate - it’s not universal, or even Galactic, or even Stellar level unique.

    A galactic level collision avoiding random number would be at least 40 bits more (for a trillion stars). 80+40+76=196 bits. Throw in a few extra bits to make a nice round 256 bit total size and you have a #GLID.

    One oddity is that the universe is expanding so eventually you will be out of light speed communication range to even nearby stars. So fewer random bits needed in far future?

  8. Your preferred method for generating unique identifiers in a medium to large distributed system?

    #uuid
    #ULID
    #snowflakeid
    #hashids
    #nanoid
    #distsys

  9. Your preferred method for generating unique identifiers in a medium to large distributed system?

    #uuid
    #ULID
    #snowflakeid
    #hashids
    #nanoid
    #distsys

  10. Your preferred method for generating unique identifiers in a medium to large distributed system?

    #uuid
    #ULID
    #snowflakeid
    #hashids
    #nanoid
    #distsys

  11. Your preferred method for generating unique identifiers in a medium to large distributed system?

    #uuid
    #ULID
    #snowflakeid
    #hashids
    #nanoid
    #distsys

  12. Your preferred method for generating unique identifiers in a medium to large distributed system?

    #uuid
    #ULID
    #snowflakeid
    #hashids
    #nanoid
    #distsys

  13. 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

    gitlab.com/colinstrickland/cms

    (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!)