Reputation: 1229
I'm sorry if this question is redundant or not well-conceived, but I am new to App Engine, and I'm not sure about the best practices for what I'm attempting to do.
I have an iOS app, and I want to use http GET and POST requests to put and query into my ndb datastore.
So far, my Endpoints API works with hardcoded data, and I can successfully GET and POST on my application and see the results. Now I need to do the same thing, but with results from datastore. I am using webapp2 framework to use ndb.
So my question is basically this: Is this an optimal way to store and receive data for my app? The queries I need are not complicated, but there is going to be a huge number of reads/writes to my datastore. This question may seem silly, but I am only asking to make sure that I am not making a huge mistake in my design, or at the least, to make sure that there isn't a much better way to accomplish this.
So for summary: I am using an Endpoints API to access an nbd datastore for a mobile application. Is this a proper thing to do? If so, what are the best practices?
Upvotes: 3
Views: 224
Reputation: 3564
Yes, that's a perfectly reasonable approach.
If you are using Cloud Endpoints and NDB, you may want to look at the Endpoints Proto Datastore API which takes some of the legwork out of serializing your NDB Model entities.
Personally, I didn't find the API very intuitive so I reverted to creating my own ProtoRPC Message classes (which is quite different to the Java approach to Cloud Endpoints).
Upvotes: 2