使用Zookeeper的分布式应用程序 [英] Distributed Application using Zookeeper

查看:171
本文介绍了使用Zookeeper的分布式应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用zookeeper设计分布式应用程序。这是我第一次使用Zookeeper,所以我很少与它的使用混淆。我已经阅读,Zab协议确保可串行化,当涉及到多个更新,但我无法理解,如果是这样的情况,它会自动允许无锁实现。所以为什么需要锁在第一位?


/ div>

Zab协议是zookeeper的关键部分。它确保消息的原子广播到副本。 Zab协议确保可串行化,但串行化的概念只确保原子数据传递到单个应用程序。
Apache使用这个协议在zookeeper中实现原子广播。



Zookeeper用于分布式服务协调。在一个n进程协调的系统中,维护一个特定的执行顺序,我们需要分布式锁。


I need to design distributed application using zookeeper. This is the first time I am using Zookeeper so I am little confused with its usage. I have read that Zab protocol ensures serializability when it comes to multiple updates but I am unable to understand, if that is the case than it will automatically allow lock free implementation. So why locks are needed in first place? It will be great if some one can help here.

Thanks

解决方案

Zab protocol is a critical PART of zookeeper.It ensures atomic broadcast of messages to the replicas . Zab protocol ensures serializability but the concept of serializability only ensures atomic data deliver to a single application . Apache used this protocol to implement atomic broadcast in zookeeper.

Zookeeper is used for distributed services co-ordination .In a system where n processes are coordinating , to maintain a particular sequence of execution we need distributed locks.

这篇关于使用Zookeeper的分布式应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆