> a good, reliable and easy-to-use > framework/class for managing SQLite database transactions for offline > iphone/touch activity? We had similar needs and rolled our own (proprietary) system, using JSON as the format used over the wire.
We've gone through some iterations and are currently moving to SQLite tables on the client and server that have a key column (a GUID) and a value column (a bunch of JSON), plus columns for "cached" fields (anything that needs to be indexed/searchable). The client and server cache different fields because their reporting/searching needs are different. Each different "entity" is in its own table with different cached fields per entity. The syncing is done on an entity basis -- all items of a particular entity-type are fully synced, then it moves on to the next entity type. Each client records the latest server-transaction-number that they have synced to, so when it's time to sync, the client tells the server what transaction number it's at and the server delivers records that have been changed since that transaction number, in chunks of a size defined by the server (the number of records delivered per chunk and the wait time between requests are adjusted manually on the server depending on the load). For conflict resolution, we've looked at Operational Transformation, but decided that it made more sense, given the requirements of our app, to go with user-resolved conflicts. If the client attempts to push an update to a record based on an out-of-date server version, it will be rejected and the user will be presented with the latest server version and their own modified-but-based-on-an-old-server-version and decide which to "keep". If they decide to keep their own, it's server-version-number is incremented so it looks like it's based on what is current on the server and that is pushed. We have plans for automated conflict resolution in the case where different fields have been updated, so the updates aren't in conflict with each-other, but we haven't implemented this yet. If you're looking for something that's open-source and RESTful, there's an ActiveRecord-based framework available from thoughtbot called Jester, but I don't think it deals with syncing and I'm not sure it deals well with performance (syncing a bunch of records at a time)... -- peter rust -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of QuickConnect Sent: Wednesday, November 03, 2010 9:23 AM To: iPhoneWebDev Subject: Re: SQLite JS Framework? The QuickConnectFamily Framework has a JavaScript implementation of this called Enterprise Data Synchronization. It is available for iOS, Android, and Blackberry. It is currently used in several applications including a major healthcare app. http://www.quickconnectfamily.org Lee On Nov 2, 12:24 pm, KCL <[email protected]> wrote: > Has any written or can recommend a good, reliable and easy-to-use > framework/class for managing SQLite database transactions for offline > iphone/touch activity? We have a need to be able to function sans > internet connection and then updating back to the servers once a > connection is available. We're just now determining some of the > foundations of our web app and I am looking for real-world experiences > and opinions. > > Thanks in advance! > > Scott. -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en. -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
