commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [PROPOSAL] [id] Prefix, UUID and Host StringIdentifierGenerator
Date Thu, 12 Feb 2004 03:57:30 GMT
Alban Peignier wrote:
> Hi everybody,
> 
> I worked on three StringIdentifierGenerator implementations which can be
> useful.
> 
> These is an "ASCII javadoc summary" :
> 
>  - PrefixStringIdentifierGenerator extends AbstractStringIdentifierGenerator
>      PrefixStringIdentifier(String prefix, StringIdentifierGenerator)
>            prefixes the identifier returns by the specified generator
>            with the given prefix
> 
>  - HostStringIdentifierGenerator extends PrefixStringIdentifierGenerator
>      HostStringIdentifierGenerator(StringIdentifierGenerator) :
>           uses the local hostname
>      HostStringIdentifierGenerator(InetAddress, StringIdentifierGenerator)
> 
>  - UUIDClockStringIdentifierGenerator
>      extends AbstractStringIdentifierGenerator
>      UUIDClockStringIdentifierGenerator(UUIDClock)
> 
> Our goal is to be able to compose a HostStringIdentifierGenerator and a
> UUIDClockStringIdentifierGenerator to identify messages in a network
> application.
> 
> PS : I can prepare a patch with these three classses. .. but not from this
> place, no real CVS access :o(.

Alban,

I have been playing around with similar ideas -- essentially concatenating 
identifiers.  We may want to enable more than two identifiers to be 
concatentated, so I would suggest something more along the lines of a 
CompositeIdentifierGenerator that could wrap an array or list of 
IdentifierGenerators and use these to generate "composite" ids.  One 
example of this would be a CompositeStringIdentifierGenerator that uses 
concatenation to combine ids.  Another strategy might be concatenate, then 
hash, etc.

I am not sure what the best design strategy will be here, but I think the 
ability to compose identifiers using different composition strategies may 
be a good thing to have.

Another sort of related thing that I have been thinking about is attaching 
signatures to ids, so that their authenticity can be validated.

Phil



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message