News for hackers. Stuff that matters.
Re:Keep your CRUD off the Internet by sc8 on Tuesday April 23, 2013 @11:05AM (#5595535)
With everything going mobile, and mobile not being so well connected, i'm looking at writing to local mobile storage, and then later syncing that storage to the server, when a connection is available.

This is perfect timing for me.

Thx.

Re:Keep your CRUD off the Internet by camus on Tuesday April 23, 2013 @11:39AM (#5595795)
I'm looking for some articles about how to do syncing 101 by the way , i heard it's kind of hard. If anyone has good links about the subject ( on HTML5 offline/online sync <=> db server ) , it would be great.
Re:Keep your CRUD off the Internet by troebr on Tuesday April 23, 2013 @12:15PM (#5596035)
I made a kind of todo/list pet project with html5 local storage earlier. All the front end was based on that storage, then it was only a matter of syncing. To do that I kept a queue in local storage, that I only emptied after a successful sync. Then you need to define conflict rules based on what you synced, and that is case-by-case.

For instance for me, deleting a task meant anything else regarding that task later was disregarded, it's deleted. Updates to tasks were treated by timestamp. For creating tasks, I had to have a temporary id that I updated after syncing, to a permanent id.

tldr; queue, precedence rules and timestamps.