首页 \ 问答 \ RabbitMQ vs GAE(RabbitMQ vs GAE)

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
更新时间:2022-12-27 17:12

最满意答案

创建的列表必须包含用于分隔每个项目的空格。 但它不是那个特定列表的元素。 您需要在打印前将列表转换为最终的字符串。 在计算每个数字的平方之间,需要将数字转换为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. So map(str,x) will convert each element in the list x 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()

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用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)