views:

371

answers:

3

I am considering backing up data from an iPhone application using the Google App Engine (GAE) - I was also considering using Python to build a RESTful app to deal with incoming/outgoing data.

On the client side I am using Core Data to store the information I wish to back up, and retrieve using the GAE.

I was wondering whether there were any good tutorials/resources on carrying out the above or whether this is perhaps something that others have tried to implement.

Any advice, or pointers, would be most welcome.

A: 

Do you want to map your core data objects onto GAE datastore objects? If so, this could be tricky. As you say, you would have to implement the server logic with python or Java, and you r iPhone objects are in Objective-C. You would need some scheme to serialize / deserialize them.

An easier approach, if all you wanted GAE for was backup, would be to serialize the Core data objects and store them as blobs with key-value pairs in GAE.

I'm not aware of any similar approaches so I'll be keeping an eye on this post.

darren
+5  A: 

An open-source implementation of a REST server for GAE-python is available here.

I know nothing about core-data, but I you could easily store the objects in GAE if you are able to serialize them as binary or xml.

Binary objects up to 1Mb can be stored as BlobProperty, and strings as TextProperty.

There is also a Blobstore API for objects up to 50 megabytes.

jbochi
+2  A: 

If you want to store your data on a server (or sync it) then you want to go through a intermediary format. I personally recommend JSON as it can be used with Core Data easily. Since you can retrieve a dictionary of all the values in an object it is trivial to convert that diction to JSON data and push it over the wire to your server. Your server can then retrieve that JSON data and translate it into whatever format the server wants to store it in.

Marcus S. Zarra