From c60468f1853a04c0cbfb5ed825aec0ef160e1634 Mon Sep 17 00:00:00 2001 From: Godruoyi Date: Thu, 15 Apr 2021 11:56:13 +0800 Subject: [PATCH] test and build --- readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 5329349..f69a1ea 100644 --- a/readme.md +++ b/readme.md @@ -30,14 +30,13 @@ Snowflake is a network service for generating unique ID numbers at high scale wi * The last part consists of 12 bits, its means the length of the serial number generated per millisecond per working node, a maximum of 2^12 -1 = 4095 IDs can be generated in the same millisecond. * The binary length of 41 bits is at most 2^41 -1 millisecond = 69 years. So the snowflake algorithm can be used for up to 69 years, In order to maximize the use of the algorithm, you should specify a start time for it. -> You must know, The ID generated by the snowflake algorithm is not guaranteed to be unique. -> For example, when two different requests enter the same machine at the same time, and the sequence generated by the node is the same, the generated ID will be duplicated. +The ID generated by the snowflake algorithm is not guaranteed to be unique. For example, when two different requests enter the same machine at the same time, and the sequence generated by the node is the same, the generated ID will be duplicated. So if you want use the snowflake algorithm to generate unique ID, You must ensure: The sequence-number generated in the same millisecond of the same node is unique. + Based on this, we created this package and integrated multiple sequence-number providers into it. * AtomicResolver (base sync/atmoic) -* Custom (you can custom) > Each provider only needs to ensure that the serial number generated in the same millisecond is different. You can get a unique ID.