Hey Nick!

After I submitted my question, I went through lots of information sources 
and gathered some information.
I feel like my question was based on many misconceptions about google app 
engine's datastore.

I think I have a strategy for the restaurant problem.
The user will provide me with country, state, city and the restaurant name, 
And I will provide the user with location(s). 
So all I really need is one specific entity and the response will simply be 
the information in that entity.
And, I don't really need to index country, state, city, and restaurant name 
with each other independently. I just need one string that holds the 
country state city and restaurant.
In fact, I think that string is unique.
So, I am thinking about having a restaurant kind with key string 
"country_state_city_restaurant"

Once the user has finished submitting the form, I can get by 
"country_state_city_restaurant" and return some information to the user. 

I wanted a smarter solution than this, because I feel that this solution 
won't scale well.
Furthermore, if I am flattening my tree structure like this, wouldn't gql 
be faster?


On Sunday, August 16, 2015 at 4:14:33 PM UTC-7, Nick wrote:
>
> The general rule is optimize for your primary use case, denormalise to 
> support others.
> In addition, enforce and support constraints In your code.
>
> If your primary case is restaurant search, embed and index all necessary 
> data. This will be the fastest solution and easiest to work with
>
> On Appengine extra data doesn't cost you unless it's indexed. There is a 
> careful balance between optimising for speed, cost and transactional 
> integrity. My advice is if this is your first go, expect to make mistakes 
> and to need to reengineer your data a couple of times. Make that process as 
> easy as possible.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/04705cc7-3673-4d82-984a-61c64b099fe8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to