The problem is simple, althought not easy to solve (someone told me I touched the Holy Grail of Internet... :-P ): a web browser on a LAN can go and surf over Internet without problems, since it's a request from the internal network to a server the bigger Internet, there's no mistery here. Since this way every browser can access to Internet, they could be able to be reached on the other way from one browser to another, but how to do this without using a server, or at least without deploying a custom one, just using currently available Internet technologies?
On a first point, I though about SIP, and specially SIP-over-WebSockets, a specification to use WebSockets as transport layer for SIP communications instead of plain BSD sockets (and whose author I was able to meet and talk on person on the conference :-) ). I worked hard here until I got noticed by a bad point: public SIP servers require to have a registered account somewhere to allow to connect to them, what breaks annonimity in a very bad way (and having the user to create a new random account on every page reload it's all except user friendly...). Thinking about it, I took a look at XMPP (Jabber), since being a from-the-people builded protocol it would probably to have an annonimous session option... and yes, it has it, but only on the EJabberD server implementation and any of the public servers has it enabled. End road.
Being so frustated by not being able to send a little piece of text from one end to another one without a server or a previously created PeerConnection (who give us up to the chicken-or-the-egg problem...) and not being able to use directly the STUN servers (PeerConnection manage the connection creation just doing what I wanted to do, but the specification doesn't give access to this low-level functionality) I decided to wait until the conference, where they gave me a little proposition about how to solve it, although I was a little reluctant about it, and in fact I believe they didn't hope it would work flawlessly: PubNub.
PubNub is a web service that allow to publish messages to a group of peers subscribed to a channel. It's say: you send a message, and it's received by everyone it's listening. It's a little bit like killing a fly with a gun since the signalling message is sent to everyone is connected, but checking by hand that the message is for you the problem is easy to solve and also it has several advantages:
- It's not a dedicated server, it's a public server, so it's dificult to break it down (there would be too much affected...)
- there are other alternatives, and also it's being developed a public specification
- the free accounts have a very restrictive limit about the number of connected peers, what helps to focus on it as a bootstrap protocol and change inmediatelly on a DataChannels based one, increaing the network density just as I designed originally (the last week I was too much focused thinking about using the signalling channel for everything...)
But these are only the good news? No, there's another one, maybe more little, but with greater consecuences: yesterday I was helping to Arindra Das over Skype with her problems with ShareIt! (really, he found a bug :-P ) and asked to him to share something so I could be able to make some test on my side, and the fact was that "magically" a PDF was shared with me from Findland to Spain. Yes: ShareIt! WORKS!!! :-D Having problems previously on some demos and not able to test it before between machines (just my main computer and my parent's one, both on my home LAN), it was a great surprise to see that it worked on the wild Internet, so adding this the "server-less" signalling thanks to PubNub, when we got native DataChannels on the browsers this project will be able to take flight :-D Let's hope they will be ready for New Year Eve... ;-)