I have a simple remoteStorage.js demo App live on the alpha 1 network. It’s very simple: let’s you create and edit a list of your favourite drinks
This demonstrates the following features that come for free with remoteStorage.js, which I have extended to talk to SAFEnetwork:
- offlineFirst operation: the app works whether connected to SAFEnetwork or not, but when connected keeps your data synchronised between your local machine and your SAFEnetwork storage.
- decentralised personnel cloud: by keeping application data synchronised with SAFEnetwork, you can access and update your favourite drinks list on any PC
This is proof of concept stuff, so expect bugs, but if you’d like to try it:
NOTE: when alpha 1 is replaced this will no longer work!
It will work without being connected to SAFEnetwork, but once you connect, your list will automatically be stored on your SAFE drive.
And if you later connect from another computer, your list will automatically be downloaded from your SAFE drive. And any edits you make the will also get updated to your SAFE drive, so whatever you connect from, your data will remain synchronised across your different computers.
Connecting To SAFE
The app doesn’t automatically try to connect. You must click on the SAFE network icon, and then it will ask SAFE Launcher for permission to access your SAFE drive, and you must then tell SAFE Launcher to “Allow” access.
If you want to check it is connected, and that it is synchronising with SAFE network, open the browser debugger (I think that’s usually Ctrl-Shift-C) and select the “Console” where you will see debug messages being printed whenever it talks to Launcher.
You should see lots of debug messages, including the POST/PUT/GET operations to the SAFE NFS API. Once authorised it synchronises every ten seconds so you should definitely see activity here when it does this.
If it isn’t synchronising: make sure you’ve managed to get it to connect to SAFEnetwork, and told SAFE Launcher to “Allow” it access.
It’s great fun watching it synchronise in the console, but for a regular user it just happens! Well I find it fun anyway
Results & Problems
I have only tried this myself using Firefox on Linux so if you check it out please let me know the results you had, including which browser and operating system you tried. Also, whether you tried synchronising across multiple PCs.
Note that the app will look like it is working even if you don’t connect to SAFE, because it is able to work offline, so to be sure it is storing your drinks on SAFEnetwork you either need to try using it from two machines, and check it synchronises from one to the other, or open the browser console and see that it is calling the SAFE NFS API without errors (e.g. periodic bursts of GET response 200).
Remember, this is on the alpha 1 network so you must use safe_launcher v0.8.0 (not 0.8.1 which is testnet 8).