English 中文(简体)
谷歌在谷歌应用引擎中将数据储存列为书面业务是怎样的?
原标题:What does Google classify as a datastore write operation in Google App Engine?

自从上周初公认会计原则进入定价模式以来,我一直在追捕超过我对数据库阅读和书写业务的配额。 我不相信谷歌是否把所有最新情况都算作一字,也不确定每栏更新是否算作单独的书写。

如果后者是真的,我能否通过一个更新职能来更新参数中的6栏,或者我是否也为6项更新收取费用?

Here is my existing code, used to update a player s score (rating) and the other details at the same time. At the moment I always populate name, email, rating, won, played and achievements with values from the client. One solution may be to only send these from the client side when they have changed value.

Long key = Long.valueOf(updateIdStr);
System.out.println("Key to update: " + key);
PlayerPersistentData ppd =null;
try {
    ppd = pm.getObjectById(
    PlayerPersistentData.class, key);
// for all of these, make sure we actually got a value via
// the query variables
    if (name != null && name.length() > 0) {
        ppd.setName(name);
}

if (ratingStr != null && ratingStr.length() > 0) {
    ppd.setRating(rating);
}

if (playedStr != null && playedStr.length() > 0) {
     ppd.setPlayed(played);
}

if (wonStr != null && wonStr.length() > 0) {
     ppd.setWon(won);
}

if (encryptedAchievements != null
    && encryptedAchievements.length() > 0) {
    ppd.setAchievements(achievements);
}

if (email != null & email.length() > 0) {
    ppd.setEmail(email);
}

resp.getWriter().print(key);
} catch (JDOObjectNotFoundException e) {
    resp.getWriter().print(-1);
}
        }
最佳回答

The number of writes you are charged for depends on your entity. In general, you are charged for 1 write for the entity, and 1 write for each index update. Each indexed property is included in the ascending and descending single-property indexes, so there s a minimum of 2 writes per indexed entity, plus any writes for composite (user-defined) indexes.

在更新现有实体时,你重新收取旧指数和新指数的分立。 因此,如果你修改了一件财产,就应当向实体收取费用,加上每件财产(删除旧价值,插入新价值)的纸面,以及所有复合指数的纸面。

问题回答

注:从<条码>每个操作到<条码>每个实体的定价结构变化。 这改变了你对数据储存的写作方式。

New Cloud Datastore Pricing Starting July 1st, 2016

On July 1, 2016, Google Cloud Datastore pricing will change from charging per operation to charging per entity. This much simpler pricing means it will cost significantly less to use the full power of Google Cloud Datastore.

For example, in the current pricing, writing a new entity with 1 indexed property would cost 4 write operations. In the new pricing, it would cost only 1 entity write. Similarly, deleting this entity in the current pricing would cost 4 write operations, but in the new pricing it would cost only 1 entity delete.





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签