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

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

问题描述

我正在使用 Storm,它适用于很多用例.最近看了一下Trident,这是Storm的高级抽象.它支持 exactly-once 处理并使有状态处理更容易.

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?

我目前阅读的内容:

  • 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天全站免登陆