Skip to content

Commit

Permalink
docs: 1.1.1 released
Browse files Browse the repository at this point in the history
stun4j committed Apr 15, 2021
1 parent 6aa877c commit 6a9f5a8
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -67,12 +67,13 @@ LocalGuid guid = LocalZkGuid.init("localhost:2181"/*zk address*/)

## Notes
* This ID generation algorithm is time sensitive, so the cluster environment must turn on the NTP service (do as much clock forward synchronization as possible) to ensure overall correctness and availability
* When [Zookeeper](http://zookeeper.apache.org/) is adopted as the distributed coordinator, the client uses [Curator](http://curator.apache.org/) to communicate with ZK. Therefore, it is necessary to pay attention to the [compatibility](http://curator.apache.org/zk-compatibility.html) between Curator and Zookeeper
* When [Zookeeper](http://zookeeper.apache.org/) is adopted as the distributed coordinator, the client uses [Curator](http://curator.apache.org/) to communicate with ZK. Therefore, it is necessary to pay attention to the **compatibility** between Curator and Zookeeper
* Tests so far shows that Curator **2.13.0** is compatible with **Zookeeper 3.4.10+(server version)**
* If you are using **Zookeeper 3.5+(server version)**, you should at least use it with Curator **3.3.0+**
* The upper limit of a cluster supporting the number of process/nodes is 1024, that's the way classic snowflake-algorithm works, that is to say, both of datacenterId and workerId scope is [0, 31], so there are 1024 kinds of combination, in the implementation of this framework is fully the concept mapping, e.g. the same restriction is made on the number of participants under a namespace for the distributed coordinator
* **Again, the combination of datacenterId and workerId is used to uniquely identify a process or node, and the combination of the two must be 'unique'**

## Roadmap
* To support latest zk&curator distribution
* To support more kinds of distributed-coordinator e.g. etcd
* Try the best to solve the time-sensitive problem
* To support ID semantic customization
5 changes: 3 additions & 2 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -65,12 +65,13 @@ LocalGuid guid = LocalZkGuid.init("localhost:2181"/*zk地址*/)

## 注意事项
* 本ID生成算法是时间敏感的,所以集群环境务必开启NTP服务(尽可能做到时钟前向同步),保障总体正确性和可用性
* 采用[Zookeeper](http://zookeeper.apache.org/)作为分布式协调者时,客户端采用[Curator](http://curator.apache.org/)和ZK进行通信,需要注意Curator和Zookeeper的[兼容性](http://curator.apache.org/zk-compatibility.html)问题
* 采用[Zookeeper](http://zookeeper.apache.org/)作为分布式协调者时,客户端采用[Curator](http://curator.apache.org/)和ZK进行通信,需要注意Curator和Zookeeper的**兼容性**问题
* 目前测试下来,Curator **2.13.0** 这个版本的兼容性比较好,可兼容Zookeeper **3.4.10+(server版本)**
* 如使用**Zookeeper 3.5+(server版本)**,那么至少应搭配Curator **3.3.0+**版本
* 一个集群支持的进程/节点数量的上限是1024,这是经典snowflake算法非常核心的一点,也就是说datacenterId和workerId的取值范围都是 **[**0,31**]**,所以有1024种组合,在本框架的实现中也充分映射了这个概念,比如对分布式协调者一个namespace下参与者的数量也做了相同的限制
* **再次重申:datacenterId和workerId结合起来被用来唯一标识一个进程or节点,这两者的组合必须是'唯一'的**

## 路线图
* 支持更新的zk和curator版本
* 支持更多分布式协调者 如etcd等
* 尽可能克服时间敏感问题
* 支持Id语义定制
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -62,8 +62,7 @@
<!-- zk -->
<curator.version>2.13.0</curator.version>
<!-- zk server 3.5+ only -->
<!-- <curator.version>3.3.0</curator.version> -->
<!-- <curator.version>4.2.0</curator.version> -->
<!-- <curator.version>3.3.0+</curator.version> -->
<!-- /zk server 3.5+ only -->

<!-- maven-release -->

0 comments on commit 6a9f5a8

Please sign in to comment.