I’m working on a voting application in GAE, and I would like to be able to support a very large number of voters (say 100,000). I’m concerned about being able to do this without hitting the cap on the entity size or any other limitations. Here is the relevant parts of my entity relationship:
class Election(db.Model):
tmp_voters = db.StringListProperty(default = "")
class Voter(db.Model):
election = db.ReferenceProperty(Election, collection_name = "voters")
While the user is editing an election, I put the list of voter email addresses in a StringListProperty called tmp_voters. Just before the election is started, I create a Voter entity for each voter, and each Voter entity has a reference to the Election entity.
It seems that for a large number of voters, tmp_voters will cause the Election entity to exceed the limit. Is that right? How do I fix that? Would using a blob be a good fix?
Will having a large number of Voter entities, each of which reference the Election entity, ever cause the Election entity to be too big? I.e., does adding a reference to the Election entity increase the size of the Election entity?
Any other limitations I should be concerned about with a very large number of voters? (other than quotas)
Adding a reference to an entity in another entity has no effect whatsoever on the referenced entity, except that the automatically-generated backreference query will return one more result.
It’s unclear to me what tmp_voters is for, but yes, if that ListProperty gets too big you will have problems, although probably not with entity size; a ListProperty can only have something like 5000 entries and you’re not going to use 1 MB of space to hold 5K email addresses.