Reputation: 26991
I am going to use App engine for my app i am building.
I am doing something like this.. from the app the user enters in information
class Employee(db.Model):
first_name = db.StringProperty()
last_name = db.StringProperty()
hire_date = db.DateProperty()
location = db.StringProperty();
attended_hr_training = db.BooleanProperty()
employee = Employee(first_name='Antonio',
last_name='Salieri')
employee.hire_date = datetime.datetime.now().date()
employee.attended_hr_training = True
employee.put()
Once the user is inserted i would like the user to receive a number that it is identified while it is in the database.
I would then like to notify the PC app that a new user has been added and then the PC will have the ability to send a something to the app and the message goes to the correct ID that the message was intended for.
Is this possible with App Engine?
EDIT:
i would like to have a main PC App that connects to each entity that gets notified when a new entry is made.
Upvotes: 0
Views: 33
Reputation: 766
I am not certain what you mean by "number that is identified".
You can store a record key like emp_key = employee.put()
That will let you access that record without doing a database query. If that is what you mean.
As far as notifying "PC app" depends on what the app is capable of. You can use channels, or xmpp to send the notice. The PC App could query the datastore periodically. There are lots of ways to do that. You send the PC App the record key as a string that it can return in the request to get the record.
Although to be honest a PC app is so 1990. You probably should be using a web browser in which case go to my AE-BaseApp/Python click the Github link and go check out the source code. Examples of everything your asking for is there. It is still a very basic app I am working on that demonstrates how to do things in App Engine.
Upvotes: 1