- To practice and learn about cloud and web development.
- To improve my Android app by backing up user data and to provide additional analysis based on a more full history for a given user and aggregated data from multiple users.
I started with this sample tictactoe application. After a few minutes I got the sample application to work on my local machine. When I moved the application to the cloud as a Google App Engine application, I got errors about "Origin mismatch". The resolution was to make sure you registered any clients with the correct url. This includes matching the protocol type as well - ie use "https".
After a few hours (spread out over a few weeks) I was able to create some new request/response objects which are used in the messages passed to and from the back end to a client. I think I have a decent feel for how things work. In my head, the cloud back end goes through the following steps.
- A Web Client (or Android) creates JSON (or java) message object.
- Your generated backend libraries convert these message objects into some request object.
- The request object is then sent to one of your backend apis/methods.
- (In my case) I take the request object and put it into the Google App Engine datastore. In your case, you can do whatever you want.
- A response message is created and sent back to the original web or mobile client.
- Your generated backend libraries convert the response message back into a message.
- Your client can then do whatever they want with the response.
I haven't actually implemented or tested anything in the Android client, so we'll see if my thinking about how this all changes.
No comments:
Post a Comment