I am making a messaging system wherein both authenticated and unauthenticated users should be able to use. Each index of the message should be unique. I am thinking of using bigint but it has a limit of about 18446744073709551615 (unsigned) which would not be ideal for me if I want to keep a record of all the messages. Also, I am thinking of a timestamp but there is a possibility that more than one user will post a message at the same time. Hence, the created timestamp will collide with other timestamp.
Do you guys have an idea what should be done here?
Thank you in advance. 😀
Seriously? If 100 messages are posted every second, BigInt will give you sufficient ids for, by my rough calculation, 6 billion years. By then you can probably archive a few messages and start the sequence over.