Application Generates Identity

There are highly reliable ways to autogenerate unique identities, although care must be taken when the application is clustered or otherwise distributed across multiple computing nodes. There are identity creation patterns that can, to a much greater degree of certainty, produce a completely unique identity. The universally unique identifier (UUID), or globally unique identifier (GUID), is one such approach. A common variation follows, where the result of each step is concatenated into a single textual representation:

1. Time in milliseconds on the computing node

2. IP address of the computing code

3. Object identity of the factory object instance within the virtual machine (Java)

4. Random number generated by the ...

Get Implementing Domain-Driven Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.