Code Monkey home page Code Monkey logo

zookeeperdesign's Introduction

前言 zk的搭建与使用的相关知识(与dubbo的合作使用以及一些常用的功能例如分布式锁一类的)

QQ:3341386488 邮箱:[email protected]

我会不断完善,希望大家有好的想法拉一个分支提高,一起合作!

觉得不错对您有帮助,麻烦右上角点下star以示鼓励!长期维护不易 多次想放弃 坚持是一种信仰 专注是一种态度!

zk本项目的整体输出流程

整体流程

zk -- > watcher事件

1.针对每一个节点的操作,都会有一个监督者 -- watcher
2.当监控的某个对象znode发生变化时,则会出发watcher事件
3.zk中的watcher是一次性的,触发后立刻销毁,通过之后客户端也可以配置不是一次性的,我们不需要一次又一次的重新设置

② 父节点和子节点,增删改都能够触发其watcher

根据不同的类型的操作触发的watcher事件是不同的 1.(子)节点创建事件 2.(子)节点删除事件 3.(子)节点数据变化事件 会有专门的事件名称,知道这些名称客户端才能够进行下一步操作

wantcher的命令行学习

通过get path [watch]设置watcher 父节点 增删改 操作触发 watcher 子节点 增删改 操作触发 watcher

watcher的事件类型

创建父节点: nodecreateed

zookeeperdesign's People

Contributors

qiurunze123 avatar

Watchers

qiankeqin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.