Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 37336 invoked from network); 15 Feb 2009 09:52:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2009 09:52:07 -0000 Received: (qmail 64174 invoked by uid 500); 15 Feb 2009 09:52:07 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 64148 invoked by uid 500); 15 Feb 2009 09:52:07 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 64138 invoked by uid 99); 15 Feb 2009 09:52:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 01:52:07 -0800 X-ASF-Spam-Status: No, hits=4.6 required=10.0 tests=FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_IPADDR,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [92.51.130.250] (HELO lvps92-51-130-250.dedicated.hosteurope.de) (92.51.130.250) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 09:51:57 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lvps92-51-130-250.dedicated.hosteurope.de (Postfix) with ESMTP id D7E611673C004 for ; Sun, 15 Feb 2009 10:51:36 +0100 (CET) Message-ID: <4997E5A8.3010808@apache.org> Date: Sun, 15 Feb 2009 10:51:36 +0100 From: Stefan Seelmann User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: UUID generator : which one ? References: <4997D281.9000206@nextury.com> In-Reply-To: <4997D281.9000206@nextury.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I'd choose java.util.UUID because it is included in each JDK, no extra lib needed. Maybe we shouldn't use one implementation directly but use a factory method. This makes it easier to switch the choosen implementation. Example: public String generateUUID(String input); or public String generateUUID(byte[] input); The input would only be used to generate version 3 or 5 UUIDs. Kind Regards, Stefan Emmanuel Lecharny wrote: > Hi guys, > > we need to generate UUIDs for every single entry we store in the > backend. The UUID is defined in a RFC [1]. There are 3 available UUID > generators [2] I know of : > - standard Java UUID generator[3] (which only support version 3 and 4 - > ie using a hashed URI or a random number - ) > - JUG [4] which support all the version but 2 > - UUID [5] which only support version 1 (MAC address based) > > Here is a short comparison : [6] > > > The question is to determinate which generator we should use, assuming > the licenses are compatible ? > > Wdyt ? > > > [1] http://www.rfc-editor.org/rfc/rfc4122.txt > [2] http://en.wikipedia.org/wiki/UUID > [3] http://java.sun.com/j2se/1.5.0/docs/api/java/util/UUID.html > [4] http://jug.safehaus.org/ > [5] http://johannburkard.de/software/uuid/ > [6] > http://johannburkard.de/blog/programming/java/Java-UUID-generators-compared.html > >