How can I implement simple serverless p2p browser to browser messaging with minimal overhead? How can I implement simple serverless p2p browser to browser messaging with minimal overhead? javascript javascript

How can I implement simple serverless p2p browser to browser messaging with minimal overhead?


After pubnub was recommended, I looked there and was partially impressed. However, I eventually stumbled across exactly what I was looking for UNBELIEVABLY. RTCDataChannel is the answer. This site finally showed that what I want is possible. The browser support for this functionality is small but growing and the entire ordeal has strengthened my faith in the growing support for peer to peer applications in the browser community.


In summary, if ajax can send a request to a specified IP and listen for a response.. why can't i get simple peer to peer messaging in pure js? Or can I?

It's due to the fact that an ajax request must be handled by an HTTP server so you still need to install a server to every clients.

say you want

  1. free
  2. no external servers
  3. no client downloads

I would say it is impossible to archive with all of these requirements except that you cut one of them off.

My suggestion is pubnub. This solution still need a server and it is not free(they have a free usage tier). But the good thing is you have an imitate p2p connection without doing server things and no client download needed.