Answer the question
In order to leave comments, you need to log in
Is UUID really that reliable?
Good afternoon. The Wiki article for UUID says:
The main purpose of UUID is to allow distributed systems to uniquely identify information without a clearing house. Thus, anyone can create a UUID and use it to identify something with a reasonable level of confidence that the given identifier will inadvertently never be used for something else. Therefore, information tagged with a UUID can be placed later in a shared database without the need to resolve name conflicts.
Answer the question
In order to leave comments, you need to log in
In your case, it is much easier to generate an ID based on the user's nickname in the chat (his ID number in the database, for short) + timestamp with microsecond precision. Guaranteed uniqueness.
In general, there is a standard on UUID that specifies the requirements, if they satisfy you, then you can safely use it. RFC4122
"The total number of unique UUID keys (excluding versions) is 2^128 = 256^16, or about 3.4 × 10^38. This means that by generating 1 trillion keys every nanosecond, it will take only 10 billion years to sort through all possible values . "(c) wiki
In your case, 100 posts * 500 people = 5*10^4 per day, then:
P1 = 1 / (3.4 × 10^38) - the probability of getting one specific value
P_day = ( 5*10^4) * P1 = 1.5 * 10^-34 - the probability of getting one certain value in 1 day
P_year = 365 * P_day = 5.5 * 10^-32 - the probability of meeting a certain value in 1 year
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question