Storm vs. Trident:什么时候不使用Trident? [英] Storm vs. Trident: When not to use Trident?

查看:104
本文介绍了Storm vs. Trident:什么时候不使用Trident?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Storm ,它适合许多用例.最近,我看了 Trident ,它是Storm的高级抽象.它支持仅一次处理,并使状态处理变得更加容易.

I'm working with Storm and it is fine for a lot of use cases. Recently I had a look at Trident, which is a high-level abstraction of Storm. It supports exactly-once processing and makes stateful processing easier.

但是现在我想知道..为什么不能总是使用Trident而不是Storm?

But now I'm wondering.. Why can't I always use Trident instead of Storm?

到目前为止,我读到的内容:

What I read so far:

  • Trident批量处理邮件,因此吞吐量时间可能会更长.
  • Trident尚无法处理拓扑中的循环.

使用Trident代替Storm时还有其他缺点吗?因为现在,我认为我上面列出的缺点是微不足道的.

Are there any other disadvantages when using Trident instead of Storm? Because right now, I think the disadvantages I listed above are marginal.

Trident无法实现哪些用例?

后果:

自从我问了一个问题,我的公司决定先去Trident.仅在存在性能问题时才使用纯Storm.遗憾的是,这并不是一个主动的决定,它只是默认行为(当时我还没有出现).

Since I asked the question my company decided to go for Trident first. We will only use pure Storm when there are performance problems. Sadly this wasn't an active decision it just became the default behavior (I wasn't around at that time).

他们的假设是,在大多数用例中,我们需要状态或仅一次处理,否则在不久的将来将需要它.我理解他们的理由是因为从Storm迁移到Trident或返回不是一个容易的转变,但是以我个人的观点,没有状态的流处理概念并不是所有人都理解的,这就是使用Trident的主要原因.

Their assumption was that in most use cases we need state or only-once-processing or we will need it in near future. I understand their reasoning because moving from Storm to Trident or back isn't an easy transformation, but in my personal opinion the concept of stream processing without state wasn't understood by all and that was the main reason to use Trident.

推荐答案

要回答您的问题:什么时候不应该使用Trident?只要您负担不起.

To answer your question: when shouldn't you use Trident? Whenever you can afford not to.

Trident增加了Storm拓扑的复杂性,降低了性能并生成状态.问自己一个问题:您是否需要Trident的仅一次"处理语义,还是可以接受Storm的至少一次"处理语义?只能使用Trident,否则请不要使用.

Trident adds complexity to a Storm topology, lowers performance and generates state. Ask yourself the question: do you need the "exactly once" processing semantics of Trident or can you live with the "at least once" processing semantics of Storm. For exactly once, use Trident, otherwise don't.

我还想强调一个事实,即Storm保证所有消息都将得到处理.有些邮件可能只会被处理多次.

I would also just like to highlight the fact that Storm guarantees that all messages will be processed. Some messages might just be processed more than once.

这篇关于Storm vs. Trident:什么时候不使用Trident?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆