Cloud synchronization
Not much coding has been done this week, instead, the main focus has been trying to figure out how to achieve the cloud synchronization with other platforms.
According to vettukal’s post, the cloud synchronization is likely to be achieved by Google App Engine, Endpoint service. According to what I have discovered by now, Endpoint would be able to generate libraries for multiple platforms, including iPhone. Therefore, compatibility will not be a big issue.
Vettukal will be working out some back end code, and Google App Engine would put some wrapper code so that it can be called in iOS. The issue is, the object, passed in from iOS must fit the one that is defined in the backend algorithm.
The problem is, Core Data DO NOT allow manipulation of the SQLite file, thought the data can be stored in SQLite format. Therefore, we can’t pass in the entire db file as argument to server, or pass back a new db file. Instead, the object, that the backend expect would have to be an array of table entries(or arrays of tables, which are arrays of table entries).
The problem is, Core Data DO NOT allow manipulation of the SQLite file, thought the data can be stored in SQLite format. Therefore, we can’t pass in the entire db file as argument to server, or pass back a new db file. Instead, the object, that the backend expect would have to be an array of table entries(or arrays of tables, which are arrays of table entries).
So the problem, now, simplifies to:
- 1.Make sure the argument that the cloud accept and returns is not db file, since db file cannot be manipulated in iOS platform.
- 2.implement the code to generate and unpack the code in iOS platform.
Depending on the approach taken by Vettukal, we can either pass in and return the entire data base, or just pass in or return the changes to be made.
If the first approach is taken, then the only thing need to do is to record down the last modified time and wrap the entire data base into an object.
The code might be more straight forward, but the data traffic would be heavier.
The second approach would requires modifying the data base a little bit to add in a synchronization time stamp to each of the entries.
Advantage being only the change get sent to /from the cloud.
Next week, the main focus would be try to work out the cloud synchronization feature. At the same time, tidy up the code, and add in commons.
No comments:
Post a Comment