Generating a unique ID for use in distributed environment