What exactly is GUID? Why and where I should use it?

后端 未结 15 2216
走了就别回头了
走了就别回头了 2020-12-13 07:48

What exactly is GUID? Why and where I should use it?
I\'ve seen references to GUID in a lot of places, and in wikipedia, but it is not very clear telling you where to

15条回答
  •  失恋的感觉
    2020-12-13 08:42

    128-bit Globally Unique ID. You can generate GUIDs from now until sunset and you never generate the same GUID twice, and neither will anyone else. They are used a lot with COM.

    As for example of something you would use them for, we use them in one of our products. Our users can generate categories and cards on various devices. We want to make sure that we don't confuse a category made on one device with a category created on a different one, so it's important that IDs are unique no matter who generates them, where they generate them, and when they generate them. So we use GUIDs (actually we use our own scheme using 64-bit numbers but they are similar to GUIDs).

提交回复
热议问题