连接串

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

进程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. LINUX CP命令直接覆盖不提示按Y/N的方法

    refer to: https://blog.csdn.net/qq_36741436/article/details/78732201 cp覆盖时,无论加什么参数-f之类的还是提示是否覆盖,当文件比 ...

  2. Codeforces 919 D Substring

    题目描述 You are given a graph with nn nodes and mm directed edges. One lowercase letter is assigned to ...

  3. Google开源基于Tensorflow的NLP框架重大升级

    http://weibo.com/ttarticle/p/show?id=2309404086117195475716

  4. js 面试的坑:变量提升

    全局中的解析和执行过程 预处理:创建一个词法环境(LexicalEnvironment,在后面简写为LE),扫描JS中的用声明的方式声明的函数,用var定义的变量并将它们加到预处理阶段的词法环境中去. ...

  5. innodb事务锁

    计算机程序锁   控制对共享资源进行并发访问 保护数据的完整性和一致性   lock  主要是事务,数据库逻辑内容,事务过程 latch/mutex 内存底层锁:   更新丢失 原因: B的更改还没有 ...

  6. smartsvn学习(-)

    3. Day-to-day use 3.1 Everyday commands Most of the common commands you will need are in the SmartSV ...

  7. 【GLSL教程】(三)在OpenGL中向shader传递信息 【转】

    http://blog.csdn.net/racehorse/article/details/6634830 引言 一个OpenGL程序可以用多种方式和shader通信.注意这种通信是单向的,因为sh ...

  8. OpenSceneGraph 3.2 版本修改点

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

  9. Mogodb集群搭建

    1.上传解压软件包 cd /home/dinpay/ 解压:tar -zxvf  mongodb-linux-x86_64-rhel62-3.2.2.tgz 重命名:  mv  mongodb-lin ...

  10. Drools的HelloWord例子

    添加drools框架运行的依赖 <!--Drools 规则相关 --> <dependency> <groupId>org.drools</groupId&g ...