上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 53 下一页

Storm-源码分析- metric

摘要: 首先定义一系列metric相关的interface, IMetric, IReducer, ICombiner (backtype.storm.metric.api) 在task中, 创建一系列builtin-metrics, (backtype.storm.daemon.builtin-metrics), 并注册到topology context里面 task会不断的利用如spout-ack... 阅读全文
posted @ 2013-07-30 14:23 fxjwind 阅读(3968) 评论(0) 推荐(0) 编辑

Storm-源码分析-Stats (backtype.storm.stats)

摘要: 会发现, 现在storm里面有两套metrics系统, metrics framework和stats framework并且在所有地方都是同时注册两套, 貌似准备用metrics来替代stats, 但当前版本UI仍然使用stats这个模块统计的数据怎么被使用, 1. 在worker中, 会定期调用... 阅读全文
posted @ 2013-07-29 15:58 fxjwind 阅读(1794) 评论(9) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Task-TopologyContext (backtype.storm.task)

摘要: 1. GeneralTopologyContext 记录了Topology的基本信息, 包含StormTopology, StormConf 已经从他们推导出的, task和component, component的streams, input/output信息 public class GeneralTopologyContext implements JSONAware { ... 阅读全文
posted @ 2013-07-26 16:26 fxjwind 阅读(1947) 评论(4) 推荐(0) 编辑

Storm-源码分析-Streaming Grouping (backtype.storm.daemon.executor)

摘要: executor在发送outbounding message的时候, 需要决定发送到next component的哪些tasks 这里就需要用到streaming grouping, 1. mk-grouper 除了direct grouping, 返回的是grouper function, 执行该grouper function得到target tasks list dir... 阅读全文
posted @ 2013-07-26 11:16 fxjwind 阅读(2763) 评论(0) 推荐(0) 编辑

Storm-源码分析-Topology Submit-Worker

摘要: 1 mk-worker 和其他的daemon一样, 都是通过defserverfn macro来创建worker (defserverfn mk-worker [conf shared-mq-context storm-id assignment-id port worker-id] (log-message "Launching worker for " storm-id " on... 阅读全文
posted @ 2013-07-23 14:49 fxjwind 阅读(2606) 评论(0) 推荐(0) 编辑

Storm-源码分析- Messaging (backtype.storm.messaging)

摘要: 先定义两个接口和一个类 TaskMessage类本身比较好理解, 抽象storm的message格式 对于IContext, 注释也说了, 定义messaging plugin, 通过什么渠道去发送message, storm这里设计成可替换的 默认定义storm实现了local和ZMQ两种plugin, 当然你可以实现更多的 local应该是用于local mode... 阅读全文
posted @ 2013-07-16 18:09 fxjwind 阅读(1546) 评论(4) 推荐(0) 编辑

Storm-源码分析-LocalState (backtype.storm.utils)

摘要: LocalState A simple, durable, atomic K/V database. *Very inefficient*, should only be used for occasional reads/writes. Every read/write hits disk. 基于map实现, 每次读写都需要从磁盘上将数据读出, 并反序列化成map, 这个过程称为sna... 阅读全文
posted @ 2013-07-11 17:01 fxjwind 阅读(1234) 评论(0) 推荐(0) 编辑

Storm-源码分析- Disruptor在storm中的使用

摘要: Disruptor 2.0, (http://ifeve.com/disruptor-2-change/) Disruptor为了更便于使用, 在2.0做了比较大的调整, 比较突出的是更换了几乎所有的概念名 老版本, 新版本, 从左到右的变化如下, 1. Producer –> Publisher 2. ProducerBarrier被integrate到Ring... 阅读全文
posted @ 2013-07-10 16:18 fxjwind 阅读(5227) 评论(0) 推荐(1) 编辑

LMAX Disruptor 原理

摘要: http://mechanitis.blogspot.com/search/label/disruptor http://ifeve.com/disruptor/, 并发框架Disruptor译文 http://blog.sina.com.cn/s/blog_68ffc7a4010150yl.html, 论文译文 LMAX需要搭建high performance的交易平台, 所以需要基... 阅读全文
posted @ 2013-07-09 15:28 fxjwind 阅读(4607) 评论(1) 推荐(0) 编辑

并发编程模型和访问控制

摘要: http://www.eecs.harvard.edu/~mdw/papers/seda-sosp01.pdf, paper Staged Event Driven Architecture (SEDA) 介绍 并发的编程模型 1. 多线程模型 最为传统的模型, 为每个request起个新的thread去执行, 以实现并发 最大的问题是, 扩展问题, request很多的时候... 阅读全文
posted @ 2013-07-03 18:09 fxjwind 阅读(1534) 评论(0) 推荐(2) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 53 下一页