I'm working on a project which has an end goal of providing the user with a local cloud environment in which they can, in an efficient manner, store and retrieve various pieces of data (files and structured data) which they can access from any device using any device as a storage server  utilizing any existing hardware they might care to use.  In this context cross-platform means Windows 7+, OS X 10.6+, Android 2.3+, iOS, and Linux (including embedded on some more obscure ARM platforms).By efficient, I mean that the user always works off a local copy of their data if it exists locally - it isn't necessary to pull data down across a (possibly metered) Internet connection unless they are away from their storage devices - especially important if the user has (say) terabytes of data. But by cloud environment I mean that the user can have devices in various locations for backup and speed reasons - for instance, maybe they have a computer at home and one at work and swap space with friends at their houses - and wherever they go they will directly access the closest copy of their data.   In the background everything will get synced. The technical issues of syncing and actually storing and retrieving are not at issue.  The main issues is how this gets implemented architecturally with regards to providing local access across a variety of networks and devices.  How can this be accomplished?   We can't use the standard client-server architecture where the server is out in the cloud somewhere, because this won't be true when the user is on a LAN with one of their storage devices.The current approach has been based on the assumption that since data will be accessible from anywhere, everything should be done through a web browser using SSL to secure communications between devices.   If the software on each device runs a web server, then everything can be done through a common, uniform API implemented across all devices, and development is simplified and time to completion is shortened.  Minimizing the amount of platform specific code is very important.However, in practice several discouraging issues to this approach have been encountered which seem insurmountable.  One is that the user should not be required to install anything special (i.e. beyond a self contained serverish app) on any given device.  To use SSL requires the procurement of certificates.  Some devices can be pull-only, for instance phones and other mobile devices.  But some devices are going to have to accept data being pushed to as needed. Self-signed certificates require extra work to be recognized, and we can't require the user to set up their system to recognize them - in fact, bugs have been encountered in some systems which make it very hard for an ordinary user to even get this to work.  Public certificates are now available for free, most notably from Lets Encrypt, but local access in some cases still requires a special DNS server to be set up (or an existing server to be modified) which resolves the public host name to a LAN IP address.  Requiring the user to install or have access to a DNS server is okay for a proof of concept for other parts of the design, but is not acceptable for a real end user.  Nor is it acceptable to require a user to root their device, or have to specially configure their device to use a special DNS server, nor is it okay to require them to buy a new expensive router because the one they have won't hairpin requests to the world visible IP address due to not having such a server.  These are all issues that have been encountered during testing.One alternative would be to implement some communications directly over sockets, using some sort of pre-shared key for encryption.  Yet I don't see how this can be integrated into the web browser without excessive work - while some reasonably recent version of a web browser can be required, it isn't acceptable to require features requiring a specific browser, or which excludes any operating system or browser, or which requires a bleeding edge or beta version, or something that requires fiddling with switches in the browser to work.  And even if this is possible in the future, it still introduces an additional side channel which requires basically re-implementing large parts of something the browser already does for free.Given all these issues, what direction would offer the best chance of meeting as many of these requirements as possible while providing an end user with as close as possible to an it just works experience?  How can devices communicate effectively and efficiently both for syncing amongst themselves and to interface with the user for storage and retrieval?
communications architecture for cross-platform, distributed, local cloud environment
architecture;cross platform;protocol;distributed system;cloud