Some data models of zookeeper
Zookeeper provides a hierarchical directory structure and naming conforms to the general file system specification.
Each node is called znode in zookeeper, and it has a unique path identification.
There are two types of znode: ephemeral and persistent, and the node znode can contain
Data and child nodes. (ephemeral cannot have child nodes. Znode exists only when the client connects to the zookeeper. Once the client hangs up, the znode is deleted. Persistent (for example, if the node is down or the zookeeper is closed, it still exists after reboot, and does not rely on the client reply. Only when the client explicitly says that the znode is deleted)
There can be multiple versions of the data in znode.
Client applications can set up a watcher on the node. For example, once the data on the node is modified, it will be broadcast to each client, and when the client receives the corresponding information, it will adjust accordingly.
Node znode does not support partial read and write, but full read and write at one time.
The type of znode is determined at creation time and cannot be modified later.
Znode has four forms of directory nodes, PERSISTENT,PERSISTENT_SEQUENTIAL,EPHEMERAL,EPHEMERAL_SEQUENTIAL
Services,apps,users, all znode.
At some point, only one client can acquire the child node locks (distributed lock)