Uniqueness of Branch UUIDs

Epicollect5 uses UUIDv4

UUID version 4 (UUIDv4) is a universally unique identifier generated using random numbers. This means that each UUIDv4 is unique with a very high probability.

There are a total of 2^122 possible UUIDv4s, which is a very large number. To put it in perspective, if you were to generate 1 billion UUIDv4s per second, it would take you approximately 86 years to generate all of them.

The probability of generating two identical UUIDv4s is extremely low. It is estimated that the probability of generating a duplicate UUIDv4 is 1 in 340 undecillion (3.4 × 10^38). This is equivalent to the probability of flipping a coin and getting heads 38 times in a row.

In practice, UUIDv4s are unique enough for most applications. They are often used to generate unique identifiers for objects in databases, distributed systems, and other software applications.

Here are some examples of where UUIDv4s are used:

  • To generate unique identifiers for database records
  • To generate unique identifiers for files and directories
  • To generate unique identifiers for users and devices in distributed systems
  • To generate unique identifiers for sessions and transactions
  • To generate unique identifiers for messages in messaging systems

Overall, UUIDv4s are a very reliable way to generate unique identifiers. They are highly unlikely to collide, even in large and complex systems.