连接串

从节点列表本地缓存
主节点对未分配的任务,随机分配给从节点(不合理??)
从节点保存一个本地待执行任务列表
单独的线程对节点已分配任务进行循环

进程p为了获锁——>创建节点znode_/lock且其为临时节点:/lock 临时节点 避免该znode崩溃而锁无法释放

https://zookeeper.apache.org/doc/trunk/zookeeperOver.html

ZooKeeper is a distributed, open-source coordination service for distributed applications. It exposes a simple set of primitives that distributed applications can build upon to implement higher level services for synchronization, configuration maintenance, and groups and naming. It is designed to be easy to program to, and uses a data model styled after the familiar directory tree structure of file systems. It runs in Java and has bindings for both Java and C.

【要解决的问题:race conditions and deadlock】

Coordination services are notoriously hard to get right. They are especially prone to errors such as race conditions and deadlock. The motivation behind ZooKeeper is to relieve distributed applications the responsibility of implementing coordination services from scratch.

【core --- They maintain an in-memory image of state, along with a transaction logs and snapshots in a persistent store.】

The servers that make up the ZooKeeper service must all know about each other. They maintain an in-memory image of state, along with a transaction logs and snapshots in a persistent store. As long as a majority of the servers are available, the ZooKeeper service will be available.

zookeeper_action的更多相关文章

随机推荐

  1. Ruby on rails初体验(一)

    接触ruby on rails 已经有一段时间了,想记录一下自己的rails历程.自己写一些小例子来帮助学习.  Rails 适用于那些以数据为中心的应用,很多应用的核心部分包括一个数据库,这些引用的 ...

  2. OpenSceneGraph 3.2 版本修改点

    OpenSceneGraph-3.2.0稳定版本发布了,改善了对iOS.Android的支持,支持OpenGL的更多新特性.可以通过 下载版块来进行下载. OpenSceneGraph 3.2 发布. ...

  3. hbase安装配置

    环境准备 Java HDFS zookeeper SSH,NTP时间同步 系统调优,这个可以等安装完后改,文件打开数(ulimit和nproc) 修改Hadoop HDFS Datanode同时处理文 ...

  4. POJ 3181 Dollar Dayz(全然背包+简单高精度加法)

    POJ 3181 Dollar Dayz(全然背包+简单高精度加法) id=3181">http://poj.org/problem?id=3181 题意: 给你K种硬币,每种硬币各自 ...

  5. &和|不等同于&&或||

    &:位与 |:位或 &&:与 ||:或 当C编译器遇到这些符号时,会怎么样了? 当一个&或| 对位进行运算. 当二个&&或||对它进行与或运算. 千万不 ...

  6. Python & Django & Pycharm 安装

    一.下载安装Python 从https://www.python.org/上下载 Python 2.7.6,双击安装包开始安装: 单击“Next”按钮,进入Python安装组件选择界面.这里我们安装全 ...

  7. Vue 内容分发slot

    1.概述 内容分发:混合父组件的内容与子组件自己的模板. 2.单个插槽 当子组件模板只有一个没有属性的插槽时,父组件传入的整个内容片段将插入到插槽所在的 DOM 位置,并替换掉插槽标签本身. 最初在  ...

  8. Codeforces Round #243 (Div. 2)——Sereja and Table

    看这个问题之前,能够先看看这个论文<一类算法复合的方法>,说白了就是分类讨论,可是这个思想非常重要 题目链接 题意: 首先给出联通块的定义:对于相邻(上下和左右)的同样的数字视为一个联通块 ...

  9. cocos2dx3.x使用cocostudio触摸事件不响应的奇葩问题

    刚刚使用3.1,发现了一些关于触摸的不同之处,对于习惯于2.x的人还是认为坑啊,简单总结一下: 使用cocostudio加进来的ui,当某个可触但不可见的时候,给他加入不论什么触摸监听事件都是依照不可 ...

  10. 如何在vs2010中添加Picture控件

    1.新建项目,并在对话框控件中拖入picture控件,并做如下设置 2.在picture控件的属性栏需要进行如下修改:ID需要修改,不能为static ID是控件的唯一标识,PictureCtrl(p ...