If you want all of the user properties searchable, your design might work just fine. You could also serialize the custom properties then store them in a TextProperty or BlobProperty, then put values needed for searching into a ListProperty (possibly on a sep model). I'd suggest trying it an seeing what kind of performance you get / which method you like better.
The number of custom fields that are indexed is going to impact your write performance, if they define 40 custom fields it will impact it a lot since all fields are indexed. Your datastore having one or one million entities won't matter much, other than some queries. Because you'll not have custom indexes, If they query for very common values in a couple fields you could hit a timeout. Again, you'll probably want to do some testing for your specific use-case to find a good solution to that problem. You might want to think about a custom deadline + tasks + cursors + polling / the channel api. I'm not sure what your other question is really. If you want to search the list, store it like you describe. Just do not forget to mark the other list as indexed=False if you do not query it! Robert On Wed, Jan 12, 2011 at 16:07, someone1 <[email protected]> wrote: > Hello All, > > I've been reading up on a lot for AppEngine over the past couple > months. I think I'm ready to start on my project, however, I have a > few questions before I start (I want to make sure my planned design > will scale well). > > The idea isn't too hard. First, I'm going to use the multitenant > features within AppEngine to seperate data between companies. I hope > to put this on the Google App market and the idea is that different > domains would have their own set data when they sign up. I obviously > won't use their domain names as my namespaces. I'll use the Users API > and federated logins to authenticate users. > > Now, I'll have a certain entity that will be mostly user-defined. I > plan to use an Expando model to define this entity. I'll have a few > basic fields set, but I want the user to define the remainder of the > fields. For the most part, they'll specify the title of the field and > it will be stored as text. I will obfuscuate the custom field names to > avoid conflicts with exisitng/reserved fields and have a seperate > model/list to define the custom field names/types so that all > instances of this model follow the structure defined by the user. > > Does this sound like a good way to model what I'm trying to achieve? > Does anyone have any suggestions/tips on alternative methods? I'm > trying to avoid high CPU usage and rely mostly on storage space, > though I'm not sure how this will scale if the user defines 40+ custom > fields and enters over 5000 instances of this entity. I'd like them to > be able to search through the custom fields (not text-searchable, more > like equivalence queries) and maintain low resource usage and fast > response times. > > On a RDBMS, I'd probably have multiple tables and a bunch of join > statements for aggregating such a custom user-defined entity, however, > I realize Datastore can suffer if I start thinking of a RDBMS design. > > Also, on a side note. I was in need of storing lists of tuples for one > kind of entity. I read online to keep the lists seperate but ordered > and manage additions/deletions accordingly. Is this a good way to > store tuples on a Datastore model? For instance, a list of emails and > the type of email address it is, like Work, Personal, etc: I'd keep > one list of just the e-mails, and another list of the kind of e-mail > it is, this way I can still search through the list of e-mails without > having to worry about the type of e-mail it is. > > Thanks in advanced! > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
