AppEngine的实体组写入限制在实际应用中非常有限? [英] AppEngine's entity group write limit is very limiting in real life application?

查看:83
本文介绍了AppEngine的实体组写入限制在实际应用中非常有限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正考虑在我的应用程序中引入实体组以实现强大的一致性。建议我有一个Order实体和一个OrderRow实体,每个Order作为它的OrderRows的父级。然后,在添加OrderRow时,使用所有OrderRow的总和更新Order是正常的。



但是由于数据存储限制为每秒写入1次,所以每次I编辑/添加OrderRow,因为订单的更新至少需要一秒。



这是正确的吗?如果是这样,那么第二个限制是极其有限的,因为它经常在一个用户请求中更新同一个实体组中的两个实体? 解决方案

如果它在一个请求中,那么你可以在同一个事务中运行它们(这是实体组的目的)。


I'm thinking about introducing entity groups in my application to enable strong consistency. Propose I have an Order entity and a OrderRow entity with each Order as a parent for it's OrderRows. Then it would be normal to update the Order with the sum of all OrderRows when adding an OrderRow.

But because the datastore is limited to 1 write per second, each time I edit/add an OrderRow it would take at least one second because of the updating of the Order.

Is this correct? If so, the one second limit is extremely limiting because it's very often you update two entities within the same entity group in one user request?

解决方案

If it is within a single request, then you can run them all within the same transaction, (which is the purpose of the entity group).

这篇关于AppEngine的实体组写入限制在实际应用中非常有限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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