Giter VIP home page Giter VIP logo

Comments (6)

hiimmrdave avatar hiimmrdave commented on June 15, 2024 1

Just browsing issues since I'm interested in using the package. It's probably best to close this as out-of-scope based on the latest UUIDv7 draft.

The text cited above does not exist in the draft-04 text. The relevant issue is handled here: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#section-6.3

  With this method, a pseudo-random Node ID value is placed within
  the UUID layout.  This identifier helps ensure the bit-space for a
  given node is unique, resulting in UUIDs that do not conflict with
  any other UUID created by another node with a different node id.
  Implementations that choose to leverage an embedded node id SHOULD
  utilize UUIDv8....

UUIDv8 gives application authors the option of including node ids, different precision of timestamp, or any other data that leaves room for sufficient randomness within 122 bits. For my use, v7 makes UUID quick enough that the generating node can be shoved into metadata if it's needed at all.

from uuidv7.

kripod avatar kripod commented on June 15, 2024

Great idea, thank you for sharing it!

As the spec draft mentions it:

implementations MAY dedicate a portion of the node's most significant random bits to a pseudo-random machineID which helps identify UUIDs created by a given node. This works to add an extra layer of collision avoidance.

The machineID MUST NOT be an IEEE 802 MAC address. The creation and negotiation of the machineID among distributed nodes is out of scope for this specification.

How should we document the generation of machine IDs and how long may they be out of the 62 random bits? (The spec doesn’t seem to mention anything about maximum length.)

from uuidv7.

CMCDragonkai avatar CMCDragonkai commented on June 15, 2024

from uuidv7.

kripod avatar kripod commented on June 15, 2024

The machine ID has to be way less than 62 bits, otherwise there would be no space left for random bits. The most significant random bits are the first bits inside the last 62 bits of a v7 UUID.

There isn’t an implementation yet, but I was curious how we could document this feature clearly.

from uuidv7.

CMCDragonkai avatar CMCDragonkai commented on June 15, 2024

I did some calculations on collision probabilities and found that it's easier if I just concatenate my machine ids at the end instead of trying to fit it into the UUIDs.

from uuidv7.

kripod avatar kripod commented on June 15, 2024

@hiimmrdave good point, I’m closing this as suggested. Thanks for your response.

from uuidv7.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.