Results 1 to 2 of 2

Thread: Question regarding IceUtil::generateUUID()

  1. #1
    grembo is offline Registered User
    Name: Michael Gmelin
    Organization: Grem Equity GmbH
    Project: E-Commerce platform
    Join Date
    Jan 2009
    Posts
    85

    Question regarding IceUtil::generateUUID()

    Hello,

    I checked the implementation of generateUUID() and figured that it basically gets 16 bytes from /dev/urandom and twists some bits for version information, pid etc. (the struct UUID used in there seems to be a remainder). I'm just curious, because your documentation states in various footnotes (e.g. 8.7.5):

    "Well, almost: eventually, the UUID algorithm wraps around and produces strings that repeat themselves, but this will not happen until approximately the year 3400."

    Since there seems to be no time related information used in generating the UUID, I cannot see how this relates to the year 3400. Did I miss something? I think this should be clarified in the manual.

    Thanks and sorry for nit-picking
    Michael

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Michael,

    Thanks for pointing this out. These notes should be removed from the manual.

    I think the very first versions of Ice may have used Version 1 UUIDs (Universally Unique Identifier - Wikipedia, the free encyclopedia), but we switched to random-generated UUIDs (version 4) a long time ago.

    It's also possible we could remove from these 15-bit from the PID and make it fully random; this is just a work-around for an old bug in the Linux kernel:
    LKML: "Bernard Normier": Concurrent access to /dev/urandom

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IceSL 0.3.2 - generateUUID()
    By kwaclaw in forum Bug Reports
    Replies: 1
    Last Post: 10-20-2008, 07:40 AM
  2. Question about demo\IceUtil\workqueue\WorkQueue.cpp
    By Yunqiao Yin in forum Bug Reports
    Replies: 4
    Last Post: 11-22-2006, 08:56 PM
  3. generateUUID on Tru64
    By bernard in forum Help Center
    Replies: 1
    Last Post: 09-07-2005, 11:00 PM
  4. Question about IceUtil?
    By JaneShang in forum Help Center
    Replies: 1
    Last Post: 05-17-2005, 10:31 AM
  5. generateUUID() -error
    By Dmitriy in forum Help Center
    Replies: 2
    Last Post: 06-29-2004, 03:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •