Go 在分布式系统开发中的应用.pdf

上传人:yyf 文档编号:3330196 上传时间:2019-08-13 格式:PDF 页数:20 大小:131.34KB
返回 下载 相关 举报
Go 在分布式系统开发中的应用.pdf_第1页
第1页 / 共20页
Go 在分布式系统开发中的应用.pdf_第2页
第2页 / 共20页
Go 在分布式系统开发中的应用.pdf_第3页
第3页 / 共20页
Go 在分布式系统开发中的应用.pdf_第4页
第4页 / 共20页
Go 在分布式系统开发中的应用.pdf_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《Go 在分布式系统开发中的应用.pdf》由会员分享,可在线阅读,更多相关《Go 在分布式系统开发中的应用.pdf(20页珍藏版)》请在三一文库上搜索。

1、About me 姓名:刘奇 微博:goroutine The most things i did if err != nil return err The most things i did reduce allocations object pool buf reuse defer SetFinalizer Reuse goroutine Cpu related Reduce syscall No SetReadDeadline No SetWriteDeadline Pipeline Parallel coordinator (gonna talk about) storage rpc

2、message queue cache . Distributed components coordinator,纠结么 zookeeper etcd how to use etcd like zookeeper :) Distributed conponents 起因以及一些差异 not gonna cover every details zookeeper vs etcd 起因: reborndb是一个分布式redis集群框架 支持透明切换引擎 为了同时支持zookeeper和etcd zookeeper vs etcd zookeeper: session etcd: stateless

3、 zookeeper vs etcd 文件和目录的差异 zookeeper: 目录可以带value etcd: 目录就是纯粹的目录 zookeeper vs etcd 临时节点 zookeeper: 直接创建 etcd: 自己去更新ttl,用goroutine不断 去更新 如果watch了临时节点:这样又会不断 产生新的事件 zookeeper vs etcd zookeeper: getwatch etcd: watch after index ? how to choose index? what if index is far from current raft index? out o

4、f date zookeeper vs etcd RebornDB的getwatch实现 让client持有状态 zookeeper vs etcd RebornDB临时节点实现 Create with TTL Update TTL Filter TTL update event when do watch zookeeper vs etcd type etcdImpl struct sync.Mutex . indexMap mapstringuint64 /pathindex etcd switch resp.Action case “set“: e.Type = zk.EventNode

5、DataChanged case “delete“: e.Type = zk.EventNodeDeleted case “update“: e.Type = zk.EventNodeDataChanged case “create“: e.Type = zk.EventNodeCreated case “expire“: e.Type = zk.EventNotWatching etcd to zookeeper event Need it everywhere About Counter Its hard to do test in distributed system Monkey test Searching. About Testing 太多的轮子了 希望有一个一统天下 grpc About RPC Thanks

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 建筑/环境 > 装饰装潢


经营许可证编号:宁ICP备18001539号-1