1.6.13

ZooKeeper Recipes


I am new to Zookeeper and trying to write down some notes about it while I am learning this component. Please skip this article unless you don't mind wasting your time. Thanks.

Introduction

  • A Guide to Creating Higher-level Constructs with ZooKeeper
    • In this article, you'll find guidelines for using ZooKeeper to implement higher order functions.
I like topic like that.
  • All of them are conventions implemented at the client and do not require special support from ZooKeeper
  • Hopfully the community will capture these conventions in client-side libraries to ease their use and to encourage standardization.
Several days ago, a friend of mine gave me this link:
  • ... that even though ZooKeeper uses asynchronous notifications, you can use it to build synchronous consistency primitives, such as queues and locks
    • ... because ZooKeeper imposes an overall order on updates, and has mechanisms to expose this ordering.
How can ZooKeeper solve the performance impact for this overall order mechanism?
  • attempt to employ best practices. In particular, they avoid 
    • polling, 
    • timers or 
    • anything else that would result in a "herd effect", 
      • causing bursts of traffic and 
      • limiting scalability.
About herd effect, I found the following explanation very interesting and useful. It really reflects what could happen in distributed programming environment.
herd effect - The impact of a excited or concentrated herd of large animals on soil and vegetation. Trampling and hoof action knock down standing vegetation and grind it into soil, along with manure and plant seeds. Herd effect is not stock density -- a large number of animals spread out and walking calmly will not produce herd effect (or much animal impact), whereas a small group of excited animals will. However, some psychological effect of a large, dense herd makes it produce more herd effect than a small herd at the same density. Applied too long or to frequently, herd effect tends to pulverize most soils and cause excessive compaction.

OOB Applications

  • Name Service
  • Configuration
  • Group Membership
  • Name service and configuration are two of the primary applications of ZooKeeper. These two functions are provided directly by the ZooKeeper API.

No comments: