您的位置:首页 > 其它

zookeeper 系列官方翻译简介(五)

2015-12-24 16:20 585 查看
Guarantees
ZooKeeper is very fast and very simple. Since its goal,
though, is to be a basis for the construction of more complicated
services,
 such as synchronization, it provides a set
of guarantees. These are:

Sequential Consistency - Updates from a client will be applied
in the order that they were sent.
Atomicity - Updates either succeed or fail. No partial
results.
Single System Image - A client will see the same view of the
service regardless of the server that it connects to.
Reliability - Once an update has been applied, it will persist
from that time forward until a client overwrites the update.
Timeliness - The clients view of the system is guaranteed to
be up-to-date within a certain time bound.
For more information on these, and how they can be used, see
[tbd]

zookeeper的保证
  zookeeper 简单而性能优异.
由于他简单快速的目标,他成为构建许多更加复杂服务的基础,比如同步服务,他提供了一系列的保证.
  1 顺序一致性: 来自客户端的更新操作将会按照顺序被作用.
  2 原子性操作: 更新要么全部成功,要么全部失败,没有部分的结果.
  3 统一的系统镜像
无论客户端链接的是哪台服务器,都能获得同样的服务视图,也就是说他是无状态的.
  4 可靠性保证
一旦写入操作被执行(作用到服务器),这个状态将会被持久化,直到其他客户端的修改生效.
  5 时间线特性
客户端访问服务器系统镜像能在一个特定时间访问内保证当前系统是实时更新的
  Simple API
One of the design goals of ZooKeeper is provide a very simple
programming interface. As a result, it supports only these
operations:

create
creates a node at a location in the tree

delete
deletes a node

exists
tests if a node exists at a location

get data
reads the data from a node

set data
writes data to a node

get children
retrieves a list of children of a node

sync
waits for data to be propagated

For a more in-depth discussion on these, and how they can be
used to implement higher level operations, please refer to
[tbd]

简单的操作API  zookeeper的设计原则之一就是提供简单的编程接口.
因此,他仅仅提供了以下几个操作.
1 创建 在目录结构树的某个位置创建一个节点
2 删除  删除某个节点
3 判断是否存在 判断某个位置上是否存在指定节点
4 获取数据 从节点中获取数据
5 设置/写入数据 写入数据到某个节点中
6 同步 等待写入数据传播到其他节点
想要进一步深入的探讨这些特性和操作,以及他们是如何实现更高级别的操作,请参看 tbd相关内容

  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: