我可以使用 Tornado+ Celery+ RabbitMQ + Redis 吗? [英] Can i use Tornado+ Celery+ RabbitMQ + Redis?

查看:46
本文介绍了我可以使用 Tornado+ Celery+ RabbitMQ + Redis 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于网络上的实时数据流,我计划使用 Redis 作为我的缓存数据层,其中数据是即时的.Celery 是队列管理器,RabbitMQ 是从 Redis 排队并到达 Tornado 层的代理.该层然后通过 websockets 流到前端.

For real time streaming of data on the web, I'm planning to use the Redis as my Cache data layer, where data is instantaneous. Celery is the Queue manager and RabbitMQ is the broker which queues from Redis and gets to the Tornado layer. This layer then via websockets streams to the frontend.

我从来没有在网上找到过Redis + RabbitMQ的组合.有人可以为相同的可靠解决方案提供指导.问题是这种整合是否可行且可取?

I have never found the Redis + RabbitMQ Combination on-line. Can someone guide with a reliable solution for the same. The problem being is such integration possible and advisable?

推荐答案

我现在非常成功地将 Tornado 和 RabbitMQ(不含 Celery)一起使用.我还做了一些原型设计,将 Redis 作为数据库插入系统.成功的最佳机会是找到可以插入 Tornado ioloop 的异步库.例如,有 tornado-redispika(用于 RabbitMQ)和 龙卷风芹菜.我应该补充一点,我从来没有用过龙卷风芹菜,所以我不确定它的质量.

I'm using Tornado and RabbitMQ (without Celery) together very successfully right now. I also did some prototyping with Redis plugged into the system as a db, as well. Your best chance at success is to find asynchronous libraries that can plug into Tornado's ioloop. For example there's tornado-redis, pika (for RabbitMQ), and tornado-celery. I should add that I've never used tornado-celery, so I'm not sure of its quality.

从纯粹的架构角度来看,我认为同时使用 Redis 和 RabbitMQ 没有任何问题.虽然两者都可以用作消息代理,但 RabbitMQ 并不真正适合用作缓存,而 Redis 非常适合该用例.如果您使用的是 memcached 而不是 Redis,那看起来一点也不奇怪,对吧?

From a purely architectural standpoint, I don't think there's anything wrong with using both Redis and RabbitMQ together. While both can be used as message brokers, RabbitMQ isn't really appropriate for use as a cache, while Redis is well-suited for that use-case. If you were using memcached instead of Redis, it wouldn't seems very unusual at all, right?

此外(也许这是我可以提出的最好的论据来建议 Redis + RabbitMQ 可以工作),Pinterest 显然使用(或至少使用)两者来运行他们的站点:http://blog.gopivotal.com/pivotal/case-studies-2/using-redis-at-pinterest-for-billions-of-relationships.

Also (and perhaps this is the best argument I can make to suggest Redis + RabbitMQ can work), Pinterest apparently use (or at least used) both to run their site: http://blog.gopivotal.com/pivotal/case-studies-2/using-redis-at-pinterest-for-billions-of-relationships.

我找到了 另一个消息来源 说他们最终用另一个解决方案替换了 Celery/RabbitMQ,但显然它对他们有用了一段时间.

I found another source that says they eventually replaced Celery/RabbitMQ with another solution, but clearly it was working for them for a while.

发现了一个 Quora 链接来自 2011 年,表示他们实际上也在运行 Tornado!

edit: Found a Quora link from 2011 that says they were actually running Tornado as well!

这篇关于我可以使用 Tornado+ Celery+ RabbitMQ + Redis 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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