Realtime p2p data sharing on Android/html5 - html

I have a Wifi connection for several Android and PC devices without internet connectivity.
All of the devices need to collaboratively modify the same data (something like editing google docs file online for several users).
PCs work with pure HTML5 app, Androids with hybrid HTML5/native.
I need to create an effective way to synchronize the data in real time without having centralized server.
The date exchange has to be secure, so no unauthorized connections could read the shared data.
The only idea I got is to have some kind of UDP broadcast via sockets, but it's not possible with WebSockets for HTML5, so I have to figure out another solution. Maybe some peer to peer replication of DB or file sharing.

You can use adobe RTMFP channel to broadcast the data to multiple peers either over LAN or internet. It only needs the flash player installment on android & PC. Another alternative is webrtc but it requires broker server to establish the connection.

Related

getUserMedia() without SSL for local storage

In my website I need to record audio from the microphone and then replay it.
I do not need to send those files to the server, they can remain on the client.
Currently I'm successfully using flash for that, but I would like to switch to html5 and getUserMedia().
I'm aware that I normally need SSL for using getUserMedia() (except from localhost use), but I'm wondering if there is some sort of exemption if I don't want the data to be uploaded (and thus there should be no security issues in using it).
There's no exemption. Having one would require running your script in some sort of local sandbox with separate local storage and no networking. Does not exist.
Only Google Chrome enforces this https requirement by the way. Other browsers do not.
Getting a free certificate is easy.

HTML files to a desktop Application?

me and my team are students and have created a game in HTML5, Javascript and CSS3 which we need for an organization that required the game to be packed into a single desktop application, that can be accessed even if there isn't a network connection.
My question is how to this, how to pack the game?
You need some sort of network connection in order to access this game from clients machines:
In internal network you have to install Web Server like Apache or nginx
and some kind of network connection between clients, it could be [LAN][3] or [Wireless LAN][4] network.

Using PeerFinder inside local wired network for P2P communication between Windows 8.1 store apps

Is it possible to use PeerFinder for initiating connection between applications in different PCs inside intranet?
I tried ProximityCS (Windows 8.1) sample and PeerFinder.SupportedDiscoveryTypes returns None for me. (Tested with Windows 8.1 Preview)
I have only found samples to connect using NFC or WifiDirect.
Is there any samples of using Infrastructure (TCP/IP) way of connecting?
Is it possible do this manually using Broadcast messages from Windows Store app?
Windows store apps support multicast; from this you can build your discoverability solution. There's a short video how-to about this on the Channel 9 site at http://channel9.msdn.com/posts/Multicast-LAN-Discovery
To send a multicast message in Windows Runtime, just send it to a multicast address. To receive, you just call JoinMulticastGroup and you can start to receive. To increase your code robustness, re-join when you learn about new networks; this will join the multicast group on newly available adapters.
Peerfinder is part of the Windows.Networking.Proxmity namespace which, as you have mentioned, supports only NFC and WifiDirect for communication and data transfer between two applications in different PCs.
Have you tried using StreamSocket so as to emulate a client-server like communication between two applications?

self hosted Analytics tool for AIR Applications?

We are developping an AIR Application that is used within our company VPN. The clients are not always connected to the network while they are in use (there are desktop clients as well as iOS clients). Now we want to add analytics functionality to get statistics of number of installations, frequency of use of certain features and so on.
Because the clients are not always connected to the network, the solution should feature offline tracking of events, which are then sent to the tracking server once a connection to the server can be established.
AppAnalytics (http://www.appanalyticshq.com/features/) offers exactly what we need, but it aparently it's not self-hosted. Because of strict security policies, the clients in our VPN are not allowed to up or download anything to/from the internet - therefore we look for something that can be hosted on a server within our VPN.
Does anyone know a good solution for this scenario?

With Native Client (NaCl) is it possible to embed a server in a page that can accept incoming requests?

Is it possible to open a port using Native Client that other browsers can connect to? Like a browser to browser connection?
In general, no. NaCl does not allow programs to open sockets directly (that would be a security problem). It is intended that NaCl/Pepper applications have the same general capabilities as Javascript applications; so something like WebSockets (connection back to the server) would be supported, but not directly opening files or sockets on the client machine. There's some work going on to have a P2P style networking in HTML5 (e.g. http://www.w3.org/TR/2008/WD-html5-20080122/#peer-to-peer) which would likely get Pepper support as well, but I don't know what the status of that is.
The only way to get P2P connection in browser is through WebRTC. If NaCl allows to use WebRTC (though Pepper API or whatever) then the only thing you need besides implementation is broker server that will connect clients with each other. See PeerJS for some info.