Added persistence service

Will swap local or remote strategy depending on the online/offline
state.