I'm building a relatively complex and data heavy web application in AngularJS. I'm planning to use php as a RESTful backend (with symfony2 and FOSRESTbundle). I have spent weeks looking around for different solutions to on/off line synchronization solutions and there seem to be many half solutions (see list below for some examples). But non of them seem to fit my situation perfectly. How do I go about deciding which strategy will suite me?
What issues that might determine “best practices” for building an on/off line synchronization system in AngularJS and symfony 2 needs some research, but on the top of my head I want to consider things like speed, ease of implementation, future proof (lasting solution), extensibility, resource usage/requirements on the client side, having multiple offline users editing the same data, how much and what type of data to store.
Some of my requirements that I'm presently aware of are:
- The users will be offline often and then needs to synchronize (locally created) data with the database
- Multiple users share some of the editable data (potential merging issues needs to be considered).
- User's might be logged in from multiple devices at the same time.
- Allowing large amount of data to be stored offline(up to a gigabyte)
- I probably want the user to be able to decide what he wants to store locally.
- Even if the user is online I probably want the user to be able to choose whether he uses all (backend) data or only what's available locally.
Some potential example solutions
- PouchDB - Interesting strategies for synchronizing changes from multiple sources
- Racer - Node lib for realtime sync, build on ShareJS
- Meteor - DDP and strategies for sync
- ShareJS - Node.js operational transformation, inspired by Google Wave
- Restangular - Alternative to $resource
- EmberData - EmberJS’s ORM-like data persistence library
- ServiceWorker
- IndexedDB Polyfill - Polyfill IndexedDB with browsers that support WebSQL (Safari)
- BreezeJS
- JayData
- Loopback’s ORM
- ActiveRecord
- BackBone Models
- lawnchair - Lightweight client-side DB lib from Brian Leroux
- TogetherJS - Mozilla Labs’ multi-client state sync/collaboration lib.
- localForage - Mozilla’s DOMStorage improvement library.
- Orbit.js - Content synchronization library
Any help would be much appreciated :)