基于Zookeeper的集群管理器 norbert

Zookeeper   2012-06-15 21:14:29 发布
您的评价:
     
5.0
收藏     1收藏
文件夹
标签
(多个标签用逗号分隔)

Norbert是一个基于Zookeeper构建的集群管理器和支持集群的C/S网络API。 norbert封装了zookeeper和netty,使用了协议栈缓存,基于Scala实现。

Norbert is a library which provides easy cluster management and cluster aware client/server networking APIs. Implemented in Scala, Norbert wraps ZooKeeper, Netty and uses Protocol Buffers for transport to make it easy to build a cluster aware application. A Java API is provided and pluggable load balancing strategies are supported with round robin and consistent hash strategies provided out of the box.

示例代码:

public class NorbertClient {
  public static void main(String[] args) {
    ClusterClient cc = new ZooKeeperClusterClient("norbert", "localhost:2181", 30000); (1)
    cc.awaiteConnectionUninterruptibly(); (2)
    cc.getNodes(); (3)
    cc.addListener(new MyClusterListener()); (4)
    cc.markNodeAvailable(1); (5).
    cluster.shutdown(6)
  }
}

项目主页:http://www.open-open.com/lib/view/home/1339765593856

扩展阅读

Zookeeper注册中心的搭建
ZooKeeper集群的安装、配置、高可用测试
zookeeper 管理界面:zkdash
基于solr和zookeeper的分布式搜索方案
ZooKeeper架构设计及其应用要点

为您推荐

logstash+es+kibana+redis搭建
用 Docker 构建分布式 Redis 集群
etcd:从应用场景到实现原理的全方位解读
分布式 Key-Value 存储系统:Cassandra 入门
apache traffic server架构

更多

Zookeeper
集群/负载均衡
相关文档  — 更多
相关经验  — 更多
相关讨论  — 更多