17

The title basically says it all. I'm aware this can't be done using traditional means. I'm not aware of any way to do it using Web Sockets, though I've never built anything more than toy apps with them.

It is fine if the solution is browser-specific (even on the client-side; i.e. peer-to-peer communication would also be awesome). For instance, is there any way to accomplish this using Chrome's NaCl?

Furthermore, if this isn't possible now, is there any fleshed-out specification for how it will work in the future? For instance, Chromium-based browsers are experimenting with a "P2P Javascript API" which appears to be currently entirely undocumented.

Here's the HTML5 spec on it: http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html#peer-to-peer-connections, though its status is unclear.

Sorry if this question is a bit haphazard; I'm basically interested in the current status of all in-browser APIs that could be used for p2p communication.

Edit: I'm not interested in Flash p2p. I'm aware it can be done, and is definitely a solution to current p2p problems, however I'm interested in new technology.

Update May 2012: For those still looking at this, the peerconnection API is slowly making its way into browsers. It is now experimentally in Chrome, along with the rest of the WebRTC API. You can check out the documentation and spec here.

Alex Churchill
  • 4,887
  • 5
  • 30
  • 42
  • 1
    Sure. Fork Chromium, hack node.js into it. Expose node.js as an API. Although you may want to look at [WebRTC](https://sites.google.com/site/webrtc/) for that p2p video conferencing – Raynos Jul 27 '11 at 19:23
  • 1
    That would work, though I'd be a bit worried about sandboxing and security, especially in node, which doesn't have the consistency I would like in its standard libraries to feel good about keeping it sandboxed. If I were to fork chromium, I'd probably take their C port for NaCl and hack in a syscall for networking, then write a mini server in C. – Alex Churchill Jul 27 '11 at 20:05
  • @alex_c but this stuff just is not ready for general consumer usage. Chromium might have some undocumented public facing API for alpha testing – Raynos Jul 27 '11 at 20:09
  • @Raynos agreed; I suspect we're a couple of years away from the first public-consumption true p2p web apps coming out (check out the end date of RTC working group: http://www.w3.org/2011/04/webrtc-charter.html). In fact, looking at the Chromium source code (`p2p_notifier.cc/h`), it looks like their p2p api actually proxies, so we'll probably just have to wait on the PeerConnection API to either move to ready for implementation or to be dropped. – Alex Churchill Jul 27 '11 at 20:19

1 Answers1

2

There's Opera Unite but I'm not aware of any cross-browser standardization effort based on that. I think by default it proxies through Opera's servers for DNS, but you can set it up for direct connections.

robertc
  • 74,533
  • 18
  • 193
  • 177