连接串

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

进程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. 网站安全测试工具GoLismero

    网站安全测试工具GoLismero GoLismero是一款开源的安全测试框架.目前,它的测试目标主要为网站.该框架采用插件模式,实现用户所需要的功能.GoLismero默认自带了导入.侦测.扫描.攻 ...

  2. Java中的JAR/EAR/WAR包的文件夹结构说明(转)

    JAR包:打成JAR包的代码,一般作为工具类,在项目中,会应用到N多JAR工具包. WAR包:JAVA WEB工程,都是打成WAR包,进行发布,如果我们的服务器选择TOMCAT等轻量级服务器,一般就打 ...

  3. ARCGIS 二次开发可以参考的资源(长期更新)

    背景: 今天,被领导教导,说是你刚入职,要尽快把项目做起.言语忠恳,而且说不要再在电脑上练习那些小的测试例子了,要直接切入项目,熟悉项目的开发框架,与设计理念.得到,我的负责人(TB)把他做的项目的资 ...

  4. iphone之判断屏幕方向

    有两种方法可以判断 1,程序刚开始运行的时候,不能获取当前方向.给你说几种方式,你试一下: 1. 可以在启动后0.01秒执行初始化的代码,这个时候就可以获取设备方向了. 2. 另外一种方式,借助状态栏 ...

  5. 【spring boot】12.spring boot对多种不同类型数据库,多数据源配置使用

    2天时间,终于把spring boot下配置连接多种不同类型数据库,配置多数据源实现! ======================================================== ...

  6. php根据日期时间生成随机编码

    订单.申请单之类的需要一个编码,通过下面方法可得 代码如下: $PNUM="PG" . date("YmdHis").rand(1000,9999);

  7. TestNG的參数化測试、共享线程池配置、參数默认值配置

    在使用TestNG进行測试时,常常会使用到一些參数化配置,比方数据库.连接池.线程池数. 使用TestNG的參数@Parameter注解进行自己主动化读取 原创文章,版权全部.同意转载,标明出处:ht ...

  8. mbr 备份

    MBR共512字节 (1) 第1-446字节:调用操作系统的机器码. (2) 第447-510字节:分区表(Partition table). (3) 第511-512字节:主引导记录签名(0x55和 ...

  9. C语言的空格问题

    对于C语言中,一般的理解是对于空格,我们可以随意输入,因为空格没啥大意义,但是事实上并非如此. 1.'\'空格的问题 '\' 字符可用于一些字符进行转移,当然也包括了 newline(enter),被 ...

  10. 转python版本的curl工具pycurl学习

    一 pycurl介绍 pycurl模块为libcurl库提供了一个python接口.libcurl是一个开源免费且方便快捷的基于客户端的url传输库,支持FTP,HTTP,HTTPS,IMAP,IMA ...