• zookeeper_action


    连接串

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

    进程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.

  • 相关阅读:
    bzoj 1016 JSOI2008 最小生成树计数
    bzoj 1070 SCOI2007 修车
    bzoj 1042 HAOI2008 硬币购物
    bzoj 1132 POI2008 Tro
    bzoj 1227 SDOI2009 虔诚的墓主人
    bzoj 1024 SCOI2009 生日快乐
    1103 POI2007 大都市meg
    bzoj 1009:[HNOI2008]GT考试
    noip2006T1 能量项链
    bzoj 1006: [HNOI2008]神奇的国度
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7665519.html
Copyright © 2020-2023  润新知