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

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

问题描述

我需要使用zookeeper设计分布式应用程序.这是我第一次使用 Zookeeper,所以我对它的用法有点困惑.我已经读过 Zab 协议在涉及多个更新时确保可序列化,但我无法理解,如果是这种情况,它将自动允许无锁实现.那么为什么首先需要锁呢?如果有人能在这里提供帮助,那就太好了.

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.

谢谢

推荐答案

Zab 协议是 zookeeper 的关键部分.它确保消息原子广播到副本.Zab 协议确保可串行化,但可串行化的概念仅确保将原子数据交付给单个应用程序.Apache 使用该协议在zookeeper 中实现原子广播.

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 用于分布式服务协调.在 n 个进程协调的系统中,为了维护特定的执行顺序,我们需要分布式锁.

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天全站免登陆