多个 Storm 拓扑之间的通信 [英] Communication Between Several Storm Topologies

查看:23
本文介绍了多个 Storm 拓扑之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在生产中部署多个 Storm 拓扑.我检查了文档,但找不到任何关于拓扑是否可以通过本机方法进行通信的参考.有没有人对如何实现这一点有任何建议?

I am trying to deploy several Storm topologies in production. I checked the documentation but couldn't find any references on whether it is possible for the topologies to communicate via native methods. Does anyone have any suggestions on how this could be implemented?

简而言之,我很想知道元组是否可以跨拓扑发送.

In short, I am interested to see if the it's possible for tuples to be sent across topologies.

感谢您的帮助!

推荐答案

从理论上讲,您可能会做到这一点.实际上,没有.

Theoretically, you could probably make it happen. Practically, no.

如果您想通过元组进行通信,您应该在一个拓扑中完成所有操作.拓扑组织计算而不是代码,所以你想一起计算的所有东西都应该在拓扑中一起出现.

If you want to communicate via tuples, you should be doing that all in one topology. Topologies organize computation not code, so all the stuff that you want to compute together should go together in the topology.

也就是说,在某些情况下,您会希望跨拓扑拆分计算,因为计算的每个部分的性质可能非常不同.在这种情况下,您将需要使用外部消息传递服务在拓扑之间切换工作.老实说,这比尝试在拓扑之间直接传递元组更容易和更健壮.我在使用 Redis 方面取得了巨大的成功.

That said, there are cases when you will want to split computations across topologies because of the possibly very different nature of each part of the computation. In such a case you will need to use an outside message passing service to hand off work between topologies. This is honestly way easier and more robust than trying to pass tuples directly between topologies. I have had great success using Redis.

这篇关于多个 Storm 拓扑之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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