I am trying to use create a Python endpoint for an Android and eventually ios application to store data in datastore, but I am having trouble understanding how it all fits together.
I know I want to have 3 entities User, Event, and Message. In my application I want to be able to be able to query, insert, and update a User. Event's will be handled as an "update" to a User entity. Then I also want to be able to query and insert the messages for the said User which is why I am not using GCM exclusively.
My User entity currently looks like this:
class User(ndb.Model):
email = ndb.StringProperty()
first_name = ndb.StringProperty(indexed=False)
last_name = ndb.StringProperty(indexed=False)
prof_pic = ndb.BlobProperty(indexed=False)
status = ndb.StringProperty(indexed=False)
location = ndb.StringProperty(indexed=False)
friends = ndb.StringProperty(repeated=True, indexed=False)
repeating_events = ndb.KeyProperty(repeated=True, indexed=False)
non_repeating_events = ndb.KeyProperty(repeated=True, indexed=False)
My Event entity looks like this:
class Event(ndb.Model):
start_time = ndb.StringProperty()
end_time = ndb.StringProperty()
color = ndb.StringProperty()
isRepeating = ndb.BooleanProperty()
and my Message entity looks like this:
class Message(ndb.Model):
message_to = ndb.KeyProperty()
message_from = ndb.KeyProperty()
text = ndb.KeyProperty()
I think I have an okay understanding of datastore and a general understanding of how an endpoint is supposed to work. I coded this all in Java once before but have decided to go with Python due to the slow start up time and general buggyness of AppEngine in Java. That being said I am having a hard time wrapping my head around how this all fits together with my android application since I am not very confident with Python.
In the example tick tack toe application that was provided they used the ProtoRPC messaging library to I think communicate between the endpoint and datastore but I don't really understand how that works at all and can't actually get my adaptation to be error free since User contains a list of User's.
My question is if, why, where, and how the ProtoRPC library should be used.