Forum Discussion

Kevin_Davies_40's avatar
Apr 07, 2017

Unique UID generation ?

I need to generate a unique UID per user. I have a trigger which tells me when there is a new user so I know when I need to generate it. It will be used for table lookup as the F5 will store it as a key in a table and the value will be the node address to which they are routed. I don't want a one-to-one mapping of UID and node address because it is being implemented for security as well as persistence. I don't want the UID to be hackable therefore it needs to be different everytime and not be associated with a specific internal address. Only we will know the relationship that we have stored in the table. If they change it in any way it will immediately become useless.

 

Which of the various methods of generating a UID, md5, rand, combination of local factors would you think it best for this scenario.

 

2 Replies

  • Hi Kevin,

    use the follwing snippet to generate collision free unique ID.

    set UID "[TMM::cmp_unit][clock clicks]"
    

    Note: The underlying theory of this method is rather simple. Each of your TMM core(s) can only compute a single UID at the same time.

    Cheers, Kai