Author: HelloGitHub- Lao Xun

A, cause

A good beginning is half done.

I am Lao Xun, an ordinary programmer with no background of 985 and 211, and I have never worked in Dachang. I just love studying technology and have always wanted to do a full series on technology. Then I joined the HelloGitHub open source organization, and with everyone’s encouragement and help, I started the explanation series.

After discussion with Egg, we finally decided the theme of this series is top open source project ZooKeeper, hereinafter referred to as ZK.

ZooKeeper is a software project of the Apache Software Foundation that provides open source distributed configuration services, synchronization services, and naming registries for large-scale distributed computing. ZooKeeper, once a subproject of Hadoop, is now a top independent open source project.

It was chosen for the following reasons:

  • ZK I once did in-depth research for a period of time about last year, but I didn’t make too many records at that time, so I just looked at them casually. But I couldn’t sort them out, and I always felt a little regret in my heart

  • I am a Java programmer myself, so from the perspective of reading and understanding, Java code is the most cordial and comfortable. Moreover, I have developed a certain degree of visual DEBUG ability, which enables me to deduce the whole process in my mind without running the program

  • ZK itself is a basic coordination framework, and other programming languages also have corresponding clients, so the audience is relatively wide, and ZK itself is distributed, with a certain degree of complexity, well worth learning

  • ZK has very little book material on the market (compared to MySQL or Redis) and is based on an older version of ZK (not the latest version), so I want to contribute to the open source community as much as I can

Second, the introduction

This series is based on the latest version of ZK: 3.6.2

This series continues the Hello universe of HelloGitHub and is called “HelloZooKeeper”. The article is roughly divided into several parts:

  • Basic Introduction (Installation and Use)
  • Business process
  • Data memory model
  • The election
  • Session management
  • Persistence & protocol
  • The interview questions
  • Configure Daqo and other ZK hidden features

Almost all of the above topics, and because the topic of ZK itself is relatively large, on the other hand, limited by my level, I can not do everything, so if there is any supplement, I will make a single article and add it.

Three, content,

A thousand miles is a short step.

Not small streams, beyond into rivers and seas.

Explaining the principle will inevitably be linked with boring, balls and I are also communicating what kind of form is easier for people to accept, and our goal is to hope that everyone can gain something from our article, so this time:

  • Using the basic source code to explain the principle of ZK

  • I’ve had a niu and a nice little story to help you understand

  • Try to use popular, humorous language to explain a complex knowledge point clearly, explain clearly

  • With pictures as the main, text as the auxiliary way, as far as possible to reduce the reading burden of readers

  • I interspersed some funny online memes and expressions from time to time in the article to further improve readers’ interest in reading

Before we begin, there are two things I’d like to say:

The views in the article are not necessarily objective facts, but they are the results of my source code, at least in my subjective cognition are correct conclusions, and do our best to be responsible for the readers. Therefore, you are welcome to point out and discuss any problems, do not leave a sentence: “garbage” away. This is irresponsible!

When I started writing this series, the latest version of ZK was 3.6.2. If ZK received a major upgrade during the writing process, I am afraid that I am not playing me. The version numbers will not change, and will be introduced separately in subsequent installments if necessary. In order to give a balance of interest and depth, some examples in the article may not be accurate, but they can only be said to be as close to the facts as possible and omit some unimportant processes, thus reducing the reading burden of readers.

Four, outlook

HelloGitHub is wonderful because of you

Since it is HelloGitHub produced series, how can the dream linkage with GitHub less?

We will provide a warehouse for storing articles. We hope that you can leave comments on articles or discussions related to ZK in the issue area:

Github.com/HelloGitHub…

I will try my best to reply to every reader. At the same time, if many people have doubts about knowledge points, I will collect them and solve them in a single article.

Please do not be stingy with your message, your message is likely to help others with the same confusion, let’s build a better HelloZooKeeper ~

Partners at all stages can join in the compilation and review of the tutorial. Welcome to:

  • Novice: participate in the correction of the wrong words, sentences, spelling, typesetting and other problems in the text
  • Users: Participate in content discussions, answering questions, and helping others
  • Old driver: Get involved in writing the article and put your name in the author column
  • Don’t understand programming small white: point a Star to support what we are doing!

Project address: github.com/HelloGitHub…

Preview: The next installment is about installation and getting started, taking you into the world of ZooKeeper. See you next week!

Five, the last

I’m HelloGitHub gravy egg:

Xun Ge er is the leader of our HelloGitHub Java Technology Group. He is an experienced Java programmer who is not only skilled, but also humorous and humble. He often in the group patiently answer everyone’s questions, I said that he a person revitalized the Java group, he said: “are the group of brothers back me!”

The HelloZooKeeper series compiled by Xunge took two months from planning to final release. In order to make the boring words more interesting, he drew more than 50 pictures and inserted all kinds of interesting pictures. I believe everyone will like it. To ensure continuous serialization, he finished nine articles before he decided to publish them, polishing the quality of the articles in the process. As for my suggestions, he would seriously consider and adopt them while maintaining his own writing style. The tutorial is also written in both open source and open format, making it easy to contribute and run, with sample projects to help you understand.

Serialized articles on technology are often not a good read, but HG will serialize this series (10+ articles) from start to finish! I hope you can learn something from “Open Source Projects” and find fun and love open source.

HelloGitHub Thank you!


Follow the HelloGitHub public account to receive the first updates.

There are more open source projects and treasure projects waiting to be discovered.