Explain read / write performance considerations in the Google Data Warehouse (GAE)?

I find it very difficult to understand the mechanics of the Google App Engine Datastore storage .
I want to understand the mechanics, so I can build my database in an optimal way for the database.

Given my example below, can someone help me:

  • optimally structure the database
  • understand the performance of both reading and writing, given that the structure

Example:
Say I have N baseball players and each has a unique identifier.
I would like the daily count of votes hit by each player (keeping the "total daily homeruns" property) and basically increase it when hit by homerun.
Thus, as time increases, I would like to show a homeruns schedule every day for every baseball player for X years.

Player 1
1/21/2011 - 2 homeruns
1/22/2011 - 0 homeruns
1/23/2011 - 1 homeruns

Reading requirement. Read the last 5 years of daily "homerun" data for a specific player?

Record Requirement: Increase the daily number of homers for a specific baseball player.

I would like to understand how to structure data, as well as the mechanics of reading and writing? Will this simple storage task scale? Thanks to everyone.

+5
2

" " :

class Player(db.Model):
  name = db.StringProperty()

class DailyHomeruns(db.Model):
  date = db.DateProperty()
  counter = db.IntegerProperty()
  player = db.ReferenceProperty(Player)

DailyHomeruns Player, :

daily_homeruns = DailyHomeruns.all().filter('player =', player)
                                    .filter('date >', date_start)
                                    .filter('date <=', date_end)
                                    .order('date')

:

Google App Engine .

, homeruns 5 800 * , , .

:
Google App Engine , , / ; DailyHomeruns, .

:
, , Player, GQL , à la SQL.
, Homeruns .
API transactions, , DailyHomeruns, TotalHomeruns .

* 3 52 , 5

+3

All Articles