Note, if you plan to use UUIDs for a new project, depending on your requirements, you may consider a more recent standard that addresses some of the shortcomings of UUID, such as flake-id, nanoid, cuid, or ulid. intermittently offline or high-latency clients). But for that slight cost, we may now generate valid, unique, persistent IDs on any node of a distributed system (e.g. We do trade guaranteed uniqueness for extremely probable uniqueness (you would need to do-loop uuid() at max speed for 73,067 years for a 50% chance of one collision). In UUID version 4, we essentially generate a random 128-bit value. Universally Unique IDentifiers transcend many constraints of traditional incremental integer IDs, especially in distributed systems. Results above generated on a 4.20GHz Intel i7-7700K with Node v12.18.0 Why use UUID? The included benchmark.js as well as independent benchmarks rank this library as the fastest pure JS UUID v4 generator available with cryptographically secure PRNG- almost 20x faster than the most popular library (using latest NodeJS).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |