Páginas

sábado, 19 de enero de 2013

Backing-up

One problems that I have found on the IndexedDB specification is the fact that databases has a same-origin policy that don't allow to share a database between several pages. So what happens if the domain of your page gets down? If it's a normal webapp with a central database and IndexedDB is used as a cache not much, just that you'll need to re-sync your content. But what happens with a server-less, pure client-side webapp like ShareIt!? There's no central database where to sync, so YOUR data is isolated and inacessible in YOUR computer, and also according to the IndexedDB specification it can be deleted by the browser at any moment. Not a good thing.

A solution that was given to me was to do some tricks with the /etc/hosts file and load a local copy of the webapp, or at least a dumper application. Nice and intelligent trick, but not available for non-techies users. What's the other (I hope that temporal) solution? Implement a backup system for the cache. This way, the cache content can be stored on a zip file directly from inside ShareIt! and later used to restore it on the same computer or on your new bough machine, or also moved to another one and update its cache with the content of your backup and help your friends to finish their downloads :-)

Now I must to go, it's time to see what Kim DotCom has to show us... :-D


P.D.: I need to see if with AppCache being the application data loaded from localhost this happens too, but I'm not sure...