Book Image

Apache ZooKeeper Essentials

By : Haloi
Book Image

Apache ZooKeeper Essentials

By: Haloi

Overview of this book

Whether you are a novice to ZooKeeper or already have some experience, you will be able to master the concepts of ZooKeeper and its usage with ease. This book assumes you to have some prior knowledge of distributed systems and high-level programming knowledge of C, Java, or Python, but no experience with Apache ZooKeeper is required.
Table of Contents (9 chapters)
4
4. Performing Common Distributed System Tasks
8
Index

Chapter 3. Programming with Apache ZooKeeper

In the previous chapter, we learned about the architecture and internals of ZooKeeper, which gave us an insight into how things work in a ZooKeeper service. So far, from the previous two chapters, we are now well versed with the ZooKeeper data model and the operations supported by it, and we know how to use the ZooKeeper shell (zkCli) to perform the basic ZooKeeper operations. We also read about the API model in ZooKeeper.

In this chapter, we are going to learn how to write client applications with the ZooKeeper client APIs.

Overall, this chapter has been organized into the following topics:

  • Programming using the ZooKeeper Java APIs
  • Writing ZooKeeper applications with the C library
  • Kazoo – a high-level Python library for ZooKeeper

It is assumed that you are familiar with high-level programming languages to follow through the sample code examples. By the end of this chapter, you will feel confident enough to start writing applications...