I am developing a mobile web application (for iPhone & Android) with a local database (using html5 webstorage) so my app is still usable when the user is offline.
This is working perfectly, but I want to save the local data on a server. So I need to synchronize the local DB with a DB on a server. The synchronisation can only be one way, but in the future, I would like to synchronize it in the both way (server <-> local DB).
This requierement looks very common (or will be common in the future for mobile web app), but I can't find a library doing that.
I know google is doing that in their mobile web app (ex. gmail), and I found the WSPL project a google project but without source to download.
If I can't find a solution, I will create a library to do that, as one way sync doesn't look difficult, but I wonder if there are other solutions.
https://github.com/orbitaloop/WebSqlSync
http://quickconnect.pbworks.com/Using-Enterprise-Synchronization
To use this lib, you need to use the DataAccessObject of the framework to access your DB. It works by storing all the SQL request applied to the DB (except select of course) , and sending them to the server. It's great to manage deletion, but it's a little heavy if you have a lot of updates, and the server need to use the same SQL language...
http://www.quickconnectfamily.org/qcdbsync/ (I think it store also the history of all the SQL requests)
https://github.com/zefhemel/persistencejs
"persistence.js is an asynchronous Javascript object-relational mapper library. You can use it in the browser, as well on the server (and you can share data models between them)."
They have a DB synch module: DOC of persistence.synch.js
(works with HTML5 DB SQLite or Google Gears on the client, and MySQL on the server)
http://impel.simulacre.org/api/Impel.inTouch