ZooKeeper 应该是一个比较常见的开源工具,加上与分布式系统渊源很深,我们其实可以“望文生义”,大致猜测一下 ZooKeeper 的作用,因为 ZooKeeper 的英文直译是“动物园管理员”,动物园里的动物就像分布式系统里的各个子系统一样,混乱且难以管理,所以 ZooKeeper 大概就是拿来管理分布式系统的,让其可控可用。
消息队列中,最熟悉的应该就是 RocketMQ 了,Kafka 和 RabbitMQ 都不是用 Java 写的,深入研究的话,时间耗费有点大,准备先熟悉透了 RocketMQ 之后再去研究 Kafka。本文很多内容其实都参照了官方文档,有兴趣的读者也可以通读一遍官方文档。
Once you understand the design patterns and have had an "Aha!" (and not just a "Huh?") experience with them, you won't ever think about object-oriented design in the same way. You'll have insights that can make your own designs more flexible,
modular, reusable, and understandable—which is why you're interested in object-oriented technology in the first place, right? —— GOF