UUID v7 vs. v4 + Rust Programming Examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 23

  • @kubre_in
    @kubre_in 7 หลายเดือนก่อน +19

    What a condensed and straightforward explanation that can actually be used in the real world.

  • @SuperRoli123
    @SuperRoli123 7 หลายเดือนก่อน +4

    Really good explanation on different techniques to store the uuids

  • @weiSane
    @weiSane 7 หลายเดือนก่อน +3

    I wish you were my teacher for a lot of things. I would understand everything so easily and very fast . You are good 👌

  • @arisweedler4703
    @arisweedler4703 7 หลายเดือนก่อน +2

    TIL UUID v7 & base58. Especially loved the watch cmd and SEEING the 3 v7s lined up next to each other. Made sense before but grokked more fully when I saw the interactivity.

  • @maxali6591
    @maxali6591 7 หลายเดือนก่อน +3

    The content is as good as usually. The time format is perfect for me.

  • @jaimalad2902
    @jaimalad2902 7 หลายเดือนก่อน +2

    Straightforward & to the point, I like it 👍

  • @ervinpm
    @ervinpm 7 หลายเดือนก่อน +2

    Thank you for sharing this, I learned a lot! 😊

  • @foklin9698
    @foklin9698 7 หลายเดือนก่อน +4

    Thanks for making these. I didn't even know about the existence of V7.
    Also, wonder what impact this will have on other tools such as snowflake, as the main critique of UUID was the database indexing part you said.

  • @ariseyhun2085
    @ariseyhun2085 7 หลายเดือนก่อน +1

    Really awesome! I'll need to keep this trick in mind

  • @midewestmond9442
    @midewestmond9442 7 หลายเดือนก่อน +1

    Thanks always learn new concept from you

  • @marcosdantas4258
    @marcosdantas4258 7 หลายเดือนก่อน +1

    Jeremy what is your hardware, because your cargo-watch is really fast, I got impressed.

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +1

      So, I have a maxed-out M3 Max.
      Now, for many of these, it might be a side effect of video editing.
      But typically, besides the initial compile, the cargo watch for me takes sub-seconds or 1 to 2 seconds. Even for a large project (currently 10K lines of code), where I am typically in a multi-crate setup, I run my `cargo watch ... test` on one library and typically focus on one function during development.

  • @camorimd
    @camorimd 7 หลายเดือนก่อน +1

    Awesome video as usual

  • @keshamix_
    @keshamix_ 5 หลายเดือนก่อน

    What an awesome video! Just…. Wow

  • @warriorblood92
    @warriorblood92 7 หลายเดือนก่อน +1

    Thanks for explanation. Though I have 2 queries
    1. Can we extract time stamp from v7 string to UTC format?
    2. Do we have assurance, u4/u7 will always give totally unique string always? Do they maintain trace? I have fear of conflicting duplicate !

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +4

      1) For UUID v7 to time (UTC), the library usually handles that. The lib would convert from string -> bytes -> time by extracting only the first 48 bits.
      2) Uniqueness - All those UUIDs, v... and so on, are stateless; each generator does not know about the others. However, the whole design of those uuid is to make the likelihood of a conflict practically impossible, but theoretically, they can occur. There are more avaiable litterature about it on the internet.

  • @Boronesss
    @Boronesss 7 หลายเดือนก่อน +1

    Happy Coding!

  • @rolandrodriguez
    @rolandrodriguez 7 หลายเดือนก่อน +1

    Excellent. 👍🏽

  • @Gordonfreems
    @Gordonfreems 7 หลายเดือนก่อน +2

    What happened to v5 and v6

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +1

      Yes, I could have mentioned those.
      - v5 is more specialized for use cases where we need to generate a UUID based on a SHA-1 namespace and name, making UUIDv5 deterministic and repeatable.
      - v6 also has a time component, similar to v7, but with a custom format. Typically, we would use v7 over v6 as it uses the well known unix time format.

  • @CuriousSpy
    @CuriousSpy 7 หลายเดือนก่อน

    if you want user-friendly id you can use cuid

    • @CuriousSpy
      @CuriousSpy 7 หลายเดือนก่อน +3

      but last time i checked - author uses panics

    • @Mankepanke
      @Mankepanke 7 หลายเดือนก่อน

      ​@@CuriousSpymaybe a good reason to get into FOSS and send some patches. :)