Generating readable unique IDs for use outside erlang

Dave Challis dsc@REDACTED
Thu Feb 10 15:34:45 CET 2011

Is there a good (and fast) way of generating a unique id for use outside 

The best method I can find for generating a unique id is to use:
{node(), now()}

Which generates something like:

This works great, and is what I use within erlang.

However, it looks a bit meaningless is likely to confuse users of the 
non-erlang application that uses it - is there a nice way to turn that 
into an integer, or series of integers instead?

E.g. turning the above into:
(or ideally a single integer)

would be fine, but I'm not sure how to get an integer from a term.

Chances are I'll be generating hundreds of thousands to several million 
of these, so I'm also a bit concerned about efficiency - turning the 
{node(), now()} tuple into a string would no doubt take up more memory 
(and some processing time).

Any suggestions on this?

Dave Challis

More information about the erlang-questions mailing list