Open piranna opened 11 years ago
Hey @piranna! Sorry for not getting back sooner.
You have an awesome idea there! And actually -- it's something along those line that I've had as a goal back when I was developing pmrpc. Pmrpc was primarily a research project and adding cross-browser capabilities (either browser-browser or browser-server) was one of such researchy features I wanted to try. Back then - WebSockets and WebRTC didn't exist (or were just being roughly specified) so I didn't do it then, and kind of never got around to it once WS and WebRTC were stable technologies.
Anyway, I'd love to see such feature in pmrpc or as an extension/plugin of pmrpc. The biggest problem in this happening is that I currently don't have the time to hack on it. However, if you want to give it a shot - I'm very open to contributions! :+1: :+1: :+1: Also, the library itself could use some love (a rewrite) to make it more up-to-date and comprehensible.
Thanks again for the feedback, and do let me know if you want to dive in. :) :fireworks:
Well, my idea was to do it myself for my own project since several months ago, but since currently PeerConnection objects can't be created from inside an WebWorker I didn't think too much on it, and since now I don't have the time too I was thinking about delegate it to you since you knew more the library :-P Let's maintain this issue open until one of the two have time to do it ;-)
Since API for inter-window communications is fairly similar to the one of WebSocket and DataChannels (send() instead of postMessage(), and both answering on 'message' events) it would be a simple and nice feature to expand pmrpc functionality to add it.
The use case I'm thinking about is to be able to use without any diference a functionality running localy on a WebWorker or on a remote server using WebSockets, or extending the inter-window functionality to diferent browsers running on diferent machines thanks to DataChannels.