Google Meet IDs generation mechanism?

900 Views Asked by At

I would like to discuss about how Google Meet ID generated. As we may know, the best approach to generate a unique, non-iterable ID maybe using UUID. However, Google Meet use a totally different approach to generate the IDs. It seems that Google Meet simply uses a 10-letter long random string as the Meet ID.

Is there any special algorithm behind the ID, or simply random string?

1

There are 1 best solutions below

0
Jo E. On

I'm not sure what Google Meet actually uses, but you can use libraries like: https://github.com/ai/nanoid

NanoID can generate short random ids similar to a Google Meet ID. From the comparison section of NanoID vs UUID:

Nano ID is quite comparable to UUID v4 (random-based). It has a similar number of random bits in the ID (126 in Nano ID and 122 in UUID), so it has a similar collision probability:

| For there to be a one in a billion chance of duplication, 103 trillion version 4 IDs must be generated.

There are two main differences between Nano ID and UUID v4:

  1. Nano ID uses a bigger alphabet, so a similar number of random bits are packed in just 21 symbols instead of 36.
  2. Nano ID code is 4 times smaller than uuid/v4 package: 130 bytes instead of 423.

NanoID has a collision calculator you can use to check the chances of a collision: https://zelark.github.io/nano-id-cc/