ZMQ VS Redis的为发布 - 订阅模式 [英] zmq vs redis for pub-sub pattern

查看:2393
本文介绍了ZMQ VS Redis的为发布 - 订阅模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Redis的支持发布 - 订阅 < BR>
ZMQ 还支持通过消息代理发布 - 订阅

redis supports pub-sub
zmq also supports pub-sub via a message broker

什么是建筑的优点\\利弊它们之间选择?结果
我针对这些都超出了明显的用例特定的性能基准测试应该做(这里的一个很好的例子)。

假设使用高级语言如Python的。

Assume use of a high-level language such as Python.

推荐答案

我既ZeroMQ和Redis的使用Python的工作。我想说ZeroMQ更强劲,它提供了真正简单的负载均衡,也比发布 - 订阅越多,就像在其他请求的答复。但是,如果你只有在发布 - 订阅是,Redis的要简单得多。

I have worked with both ZeroMQ and Redis with python. I would say ZeroMQ is more robust, it offers real simple load balancing and also more than pub-sub, like request reply among others. But if you are only after pub-sub, redis is much simpler.

在或案件Redis的服务器崩溃停止工作,所有客户端将停止工作,以及与ZeroMQ,客户工作,即使没有服务器。

In case the redis server crashes or stops working, all the clients will stop working as well, with ZeroMQ, the clients work even if there is no server.

这两种服务都可以与任何编程语言,Ruby,Python和C,C ++等。

Both services are available with any programming language, ruby, python, C, C++ and more.

总之,Redis是更简单,非常可靠。 ZeroMQ是非常可靠的,但更为复杂。

In short, redis is much simpler, very reliable. ZeroMQ is extremely reliable but more complex.

如果我只是做酒馆子,我会选Redis的,否则我会选ZeroMQ。如果我会预见的流量巨大负荷,我会选ZeroMQ

If I was only doing pub sub, I would pick redis, else I would pick ZeroMQ. If I would forsee huge loads of traffic, I would pick ZeroMQ

这篇关于ZMQ VS Redis的为发布 - 订阅模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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