directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: UUID generator : which one ?
Date Sun, 15 Feb 2009 09:51:36 GMT
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
> 
> 


Mime
View raw message