RabbitMQ vs GAE(RabbitMQ vs GAE)
我正在编写一个实时交换消息的实时移动游戏,我想知道我应该选择什么:RabbitMQ或GAE。 我知道GAE是一个有效的解决方案,因为几乎所有东西都已经实现,所以我的编程速度更快,但从长远来看,我不知道我是否愿意支付那么高的价格 - 所以它归结为实现我自己的服务器上的其他一些消息交换服务,所以我在考虑RabbitMQ。
令我担心的是,RabbitMQ节点可以添加到集群中,但如果GAE使用1.000个实例,那么处理相同负载需要多少RabbitMQ节点,因为我真的不希望在一个节点中拥有1.000个节点集群,这意味着我必须租用1.000 VPS。
所以,这就是为什么我要确定处理100万用户需要多少兔子节点(在集群中)。 我正在尝试将其与Google Appengine Instances进行比较。 假设我在GAE上的应用程序应该处理以下内容: - 10.000个请求/秒 - 运行1000个实例
我知道我们无法真正比较这些,但无论如何我们都要这样做。 我想知道以下问题:
1.我想处理10.000个请求/秒(每个请求需要一个至少需要1-10分钟的永久连接):
a)为了可行,需要多少个GAE实例?
b)RabbitMQ需要群集中有多少个节点才能工作?
2.我希望与具有1.000 GAE实例的RabbitMQ进行比较:
a)1个GAE实例与RabbitMQ中的1个群集节点相比可以做多少工作?
你会选择什么:
a)我知道你们都会说GAE,因为它很容易,已经准备好等等。
b)但是,我们是否愿意支付所有这些费用。 更不用说谷歌有一些限制因为作者在这里谈论它们: http : //www.carlosble.com/2010/11/goodbye-google-app-engine-gae/ 。
感谢所有有价值的答案
I'm programming a real-time mobile game that exchanges messages in real time and I would like to know what should I choose from: RabbitMQ or GAE. I know that GAE is a solution that works and makes my programming much faster since almost everything is already implemented, but on a long run I don't know if I'm willing to pay those really high prices - so it comes down to implementing some other message exchange service on my own servers, so I'm thinking about RabbitMQ.
The thing that worries me is that the RabbitMQ nodes can be added to a cluster, but if GAE uses 1.000 instances, how much RabbitMQ nodes would it take to handle the same load, because I really don't want to have 1.000 nodes in a cluster, which means I have to rent 1.000 VPSs.
So, that is why I'm trying to determine how much rabbitmq nodes (in a cluster) would it take to handle 1 million of users. I'm trying to compare that to Google Appengine Instances. Let's say my application on GAE should process the following: - 10.000 requests/second - 1000 instances running
I know we can't really compare those, but let's do it anyway. I want to know the following questions:
1. I want to handle 10.000 requests/s (each request needs to be a permanent connection that takes at least 1-10 minutes):
a) How many GAE instances would be needed for that to be feasible?
b) How many nodes in a cluster would be needed with RabbitMQ for it to work?
2. I want a comparison to RabbitMQ with 1.000 GAE instances:
a) How much work can 1 GAE instance do compared to 1 cluster node in RabbitMQ?
3. What would you choose:
a) I know you'll all say GAE, because it's really easy, already is prepared, etc.
b) But then again, are we willing to pay all that. Not to mention that Google has some restrictions as the author is talking about them here: http://www.carlosble.com/2010/11/goodbye-google-app-engine-gae/ .
Thanks for all the valuable answers
原文:https://stackoverflow.com/questions/11338034
最满意答案
创建的列表必须包含用于分隔每个项目的空格。 但它不是那个特定列表的元素。 您需要在打印前将列表转换为最终的字符串。 在计算每个数字的平方之间,需要将数字转换为
int
。 因此,您可以对该数字执行数学运算,因为在获取数字时,它将被取为字符串而不是整数。map
函数将函数应用于iterable中的每个元素并返回结果列表。 因此map(str,x)
会将列表x
中的每个元素转换为字符串,因为您无法打印整数+
字符串是最终的。def Squaring(): List = eval(input(": ")) r = [] for i in List: r.append(int(i) ** 2) return r def main(): x = Squaring() print('[' + ','.join(map(str, x)) + ']') main()
Created list must contain spaces to separate each item. But it's not the element of that particular list. You need to convert the list to a string at the final before printing. In-between for calculating the square of each number, you need to convert the number to
int
. So that you could do the mathematical operation on that number because while fetching the number, it would be fetched as string not integer.map
function will apply a function to each element in the iterable and return a list of the results. Somap(str,x)
will convert each element in the listx
to string because you can't print integer+
strings are the final.def Squaring(): List = eval(input(": ")) r = [] for i in List: r.append(int(i) ** 2) return r def main(): x = Squaring() print('[' + ','.join(map(str, x)) + ']') main()
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
strip()删除前导和尾随空白字符。 with open("transfer-out/" + file, "r") as f: for line in f: cleanedLine = line.strip() if cleanedLine: # is not empty print(cleanedLine) 然后,您可以将脚本重定向到一个文件python clean_number.py > file.txt ,例如。 strip() re ...
-
jQuery从选择列表中删除选项,其中变量有空格(jQuery remove option from select list where variable has spaces)[2023-08-31]
用"包裹它: $('option[value="'+popupSelect+'"]').remove(); Wrap it with ": $('option[value="'+popupSelect+'"]').remove(); -
序言:删除列表中的所有空格(Prolog: delete all spaces in list)[2023-01-15]
:- set_prolog_flag(double_quotes, chars). :- use_module(library(double_quotes)). spdels([], []). spdels([Cs], [Cs]). spdels([Cs|Css], [Ds|Dss]) :- Css = [_|_], Dss = [_|_], text_nospaces(Cs, Ds), spdels(Css, Dss). text_nospaces([], []). text_ ... -
我有完全相同的问题。 你想拥有干净的模板html文件,你可以轻松阅读(你得到了什么),并且你想要在渲染时同时拥有人类可读的html。 因此,您不会对将templatetag.html文件更改为类似的内容的解决方案感到满意,这看起来像旧的php意大利面: {% load custom_tag_library %}{{ content.name }} {% if children %}{% for child in chil ...
如何从列表中删除空格?(How to remove empty spaces from a list? Why the `if` statement does not work?)[2023-05-03]
创建的列表必须包含用于分隔每个项目的空格。 但它不是那个特定列表的元素。 您需要在打印前将列表转换为最终的字符串。 在计算每个数字的平方之间,需要将数字转换为int 。 因此,您可以对该数字执行数学运算,因为在获取数字时,它将被取为字符串而不是整数。 map函数将函数应用于iterable中的每个元素并返回结果列表。 因此map(str,x)会将列表x中的每个元素转换为字符串,因为您无法打印整数+字符串是最终的。 def Squaring(): List = eval(input(": ")) r ...使用css: ol { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; } Using css: ol { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }由于join需要字符串对象,因此需要将这些项显式转换为字符串。 例如: hello = ','.join(list(xrange(100))) TypeError: sequence item 0: expected string, int found 所以: hello = xrange(100) print ''.join([str(n) for n in hello]) 注意,不需要list() 。 Since join takes string objects, you need to conv ...如果您的目标是仅仅比较两个字符串,而不考虑空格和下划线,则可以创建一个扩展方法来剥离它们,然后执行比较: public static string SuperStrip(this string InputString) { if (string.IsNullOrWhiteSpace(InputString)) return string.Empty; return InputString.Replace(" ", string.Empty).Replace("_", str ...重新编辑: 根据您在下面发表的评论,我认为您实际上将在Racket中编写此算法。 在这种情况下,我有一个更简单的处方:不要做任何事情。 特别是,您的输入当前不包含任何空格。 您看到的空格是作为Racket显示机制的一部分插入的,就像数据库打印机可能打印用逗号或制表符分隔的字段一样。 而不是担心逗号,而是专注于解决算法。 它需要什么,它产生什么? RE-EDIT: Based on the comments you've made below, it looks to me like you're actua ...相关文章
更多- RabbitMQ 简介
- RabbitMQ 插件管理
- RabbitMQ 集群搭建
- RabbitMQ 环境配置-基于linux
- RabbitMQ vhost管理
- RabbitMQ 简单队列
- RabbitMQ 用户管理
- RabbitMQ 与Spring整合
- RabbitMQ 消息确认方式
- RabbitMQ topic Exchange使用
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)