Sure. I'll break it into usability and technical.
Technical.
The first task would be to replace XHR with localjs so that RTC peers could be targeted. It looks like remotestorage.js does binary data, which localjs doesn't fully support yet, so I'd need to finish implementing that.
The second task would be to implement the a localjs server for the remotestorage spec. Not too hard.
The third task would be dealing with incompatibilities -- this would need some consideration ahead of time, because there might be a blocker. Like I said, the OAuth redirect wouldn't work. Localjs also assigns webrtc peer URIs using a scheme that looks like this: "httpl://
us...@relayhost.com!
apphost.com". That would make the login a bit awkward - pfraze@pfraze@
grimwire.net!
remotestorageapp.com? Probably not a good idea. That said, Grimwire/Local.js have auto-configuration tools that might make that login unnecessary (explained below).
After all that, most of the software should work as before. The localjs servers are drop-in replacements for traditional web hosts, so remotestorage would continue to work with http servers and the new httpl servers.
Usability.
Grimwire is a traditional http webhost -- you have to have it for webrtc signalling. It distributes tokens for 3rd-party app access, and has a widget that's actually pretty similar to the remotestorage.js one. (Instead of redirect though, I used a popup and window.opener.postMessage(token, thirdPartyAppOrigin), which I *think* should be secure but I'll be interested to hear if otherwise.)
You would open the remoteStorage application in your browser, then connect to your relay. The auto-configuration tool is similar to webfinger, but based on RFC 5988: basically rel-typed links kept in a registry on the relay and sent down in response headers. The remoteStorage app would register a link to itself with the "remotestorage" reltype, as you do already in the webfinger (assuming remotestorage gets into the iana registry - otherwise you'd need to use a URL reltype like "
remotestorage.io/provider" to stay compliant with 5988).
Then, the user would open other applications and connect them to the relay. If the apps use remotestorage, it'd query the registry's links, find the open app, and then go through some authorization process (perhaps a permission popup in the remoteStorage tab.) After that, it would work as it does now.
The remoteStorage app would have to stay active in the browser to remain available. It would be accessible from other devices, so you could open it on the desktop and leave that running for your other devices.
Paul