. NET Core) Zookeeper asynchronous client

Source: Internet
Author: User
Tags zookeeper

Read Catalogue

    • What is zookeeper?
    • Project Introduction
    • Features that are provided
    • Instructions for use
    • FAQs

In the company's internal micro-service architecture has been used in the "ZooKeeper", although the official has provided. NET SDK, but the ease of use is very poor, and search through GitHub, NuGet, did not find a cross-platform and easy to use components, so I "beautify" a wheel.

Back to catalogue what is zookeeper?

Zookeeper is a distributed, open source distributed application Coordination Service that is an open source implementation of Google's chubby and an important component of Hadoop and HBase. It is a software that provides consistent services for distributed applications, including configuration maintenance, domain name services, distributed synchronization, group services, and so on.

The goal of zookeeper is to encapsulate complex and error-prone services that provide users with easy-to-use interfaces and performance-efficient, robust systems.

Back to Catalog Project introduction

The project uses the Apache ZooKeeper. NET Async Client component, in addition to providing basic ZK operations, and additionally encapsulates common functionality to allow. NET developers to better use ZooKeeper.

This project is open source and uses the Apache 2.0 Open source protocol.

Supported platforms
    1. . NET 4 and above
    2. . NET Core
Project Address

Github:https://github.com/rabbitteam/zookeeper-client

nuget:https://www.nuget.org/packages/rabbit.zookeeper/

Back to the functionality provided by the directory
    1. Session Expiration re-connect
    2. Permanent Watcher
    3. Recursive deletion of nodes
    4. Recursive creation of nodes
    5. Cross-platform (support for. NET Core)
Back to directory usage instructions

Here is a list of commonly used methods, not limited to this Oh!

Create a connection

Create a Node

Get node data

Get child nodes

Determine if a node exists

Delete a node

Update node

Subscription data changes

Subscription child node changes

Back to the Catalog FAQ when will the "Subscribedatachange" event be triggered?

Events that are subscribed through the "Subscribedatachange" method are triggered in the following situations:

    1. Node is created
    2. node is deleted
    3. Node data changes
    4. ZK Connection re-connected successfully
When will the "Subscribechildrenchange" event be triggered?

Events that are subscribed through the "Subscribechildrenchange" method are triggered in the following situations:

    1. Node is created
    2. node is deleted
    3. Nodal node changes
    4. ZK Connection re-connected successfully
How do I differentiate the state of a node in the "Xxxxchange" event?

There is a property "type" with the type "EventType" in the event trigger parameter, which clearly distinguishes the cause of the node change.

Why write this program, what is it different from "Zookeeperex"?

The official components provide only the basic API, which requires very complex things to be done in a normal ZK-use scenario, which breeds a lot of extra code and does not guarantee the correctness of its execution.

In the Java language There are also package zkclient for the official ZK package, which is also referenced by the current component. Please refer to the "Features provided" section for specific package features.

What if there is a problem?

You can contact me in the following ways (based on the easiest to get processing priority order):

    1. Build issues on GitHub
    2. Join QQ Group: 384413261 (click to add: Rabbithub) to ask questions
    3. e-mail me,[email protected]
    4. Private messages in the station I

. NET Core) Zookeeper Async client

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.