10 ms·
WebRTC Chat on IPFS
- deleted 8y ago[deleted]
- realPubkey 8y agoWhat is used as STUN-Server for WebRtc?
- niftich 8y agoThe post makes it sound like it's a copy of https://github.com/cjb/serverless-webrtc https://github.com/cjb/serverless-webrtc uploaded to IPFS; examining the code [1] shows that '23.21.150.121' is hardcoded for STUN. This was seemingly set up by Wesley Dawson [2] at Mozilla in 2013, at which point it was an EC2 machine in AWS us-east-1. It subsequently made it into various gists and projects as a public STUN server. Later in 2013 Mozilla changed over to using a hostname in Firefox instead [3], and much later Firefox 41 removed [4] Mozilla's STUN servers from being defaults. I'm not sure how one would go about confirming that this service is still pro bono and not malicious, and whether it's likely to stick around in the future. [1] https://github.com/cjb/serverless-webrtc/blob/master/js/serverless-webrtc.js https://github.com/cjb/serverless-webrtc/blob/master/js/serv... [2] https://bugzilla.mozilla.org/show_bug.cgi?id=807494 https://bugzilla.mozilla.org/show_bug.cgi?id=807494 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=920991 https://bugzilla.mozilla.org/show_bug.cgi?id=920991 [4] https://bugzilla.mozilla.org/show_bug.cgi?id=1143827 https://bugzilla.mozilla.org/show_bug.cgi?id=1143827
- realPubkey 8y agoThanks for that informative answer. So we have a serverless web-chat with a stun-server that might go offline at any time. I don't know a solution to do the chat really serverless. One option would be to use ethereums whisper, so we can use all eth-nodes to handle the webrtc-connection. This would not be 'really' serverless but at least surely work for a long time.
- smaddox 8y agoA single hard-coded STUN server is a big face-palm for a "serverless" chat app. `ipfs.io` could at least host their own STUN server. As long as they disable TURN, it shouldn't require much bandwidth. It's not like very many people are actually going to actually use this...
- NVRM 8y agoToo bad it isn't developed anymore. i already try to use it, but i was facing hard time with this lib.
- shams93 8y agoYou're basically attempting to manually exchange the ice handshake so there wouldn't be one here, although the demo gives me an empty offer so as is it doesn't seem to work to create a new chat on there.
- shams93 8y agoUnless this only works on firefox, perhaps it doesn't work with chrome.
- disiplus 8y agothe problem is signaling, i wanted to use ethereum for signaling but there is to much back and forth to establish a connection for it to be viable.
- yellowsir 8y agoi get an empty offer to copy and the following js error: Error adding stream to pc1: NotFoundError: The object can not be found here. (FF + local ipfs gateway)
- david4096 8y agoI had to wait for a long time for the offer to show up. Post issues here! https://github.com/cjb/serverless-webrtc/issues https://github.com/cjb/serverless-webrtc/issues
- est 8y agoCan we stop calling everything "serverless"? It's a stupid name. I assume it means peer-to-peer here right?
- timlyo 8y agoIt's serverless in that there is no specific server running it. The website is distributed across Ipfs and the chat is peer-to-peer.
- eeZah7Ux 8y agoIt's still a stupid name.
- some_account 8y agoIt's used now as official term on AWS and probably other clouds as well. Its the new hot thing since you don't need to provision any servers or infrastructure. All you do is write code and deploy it to a cloud platform. And it's much much cheaper as well. So yeah it's a dumb term but it's here to stay. :)
- fauigerzigerk 8y agoCheaper? I have no idea what running a particular app would cost. The ridiculously fine grained way in which the big IaaS providers charge for their services is a major reason why I'm avoiding them whenever I can. It's just too risky, too complex and too brittle. Any tiny change can have huge cost implications.
- 0x6c6f6c 8y agoFrom what I've read if you had a single instance of a lambda function running 24/7 it's still cheaper than the micro EC2 instance. You have warm-up time on initial requests if the functions been idle for awhile, but otherwise the response time is fairly quick <25ms and it scales up with your traffic directly. It's cheap for a web application served primarily from CDN with serverless for backend logic and easy entry to using other AWS services with secure access per function. Starting a web app through serverless would be insanely cheap barrier to entry with serverless considering you only pay for processing time. Whether this works well depends largely on the architecture of the application and if it's done right. You can absolutely have a serverless application that would be much better served with elastic beanstalk or ECS perhaps but to say serverless is useless or too expensive all around is not true.
- akerro 8y agoI wanted to write that there is another similar project based on Beaker Browser (P2P) browser, that uses dat protocol and direct streaming to another browser... but I can't find it. https://beakerbrowser.com/ https://beakerbrowser.com/
- cbluth 8y agoI wanted to not reply to this... but I didnt.
- EGreg 8y agoI never understood how Beaker browser can act as a server listening on a port. It sounds like you always need relays on the internet because your router and ISP is gonna block all ports unless requested not to. Read this: https://www.scuttlebutt.nz/stories/design-challenge-avoid-centralization-and-singletons.html https://www.scuttlebutt.nz/stories/design-challenge-avoid-ce...
- k__ 8y agoMaybe ipv6 or upnp helps?
- pfraze 8y agoBeaker doesn't act as a server, it uses Dat, which is very similar to SSB and IPFS. https://datprotocol.com https://datprotocol.com Responding to GP, you probably mean https://github.com/cabal-club/ https://github.com/cabal-club/, which is a WIP and relies on some new protocol features not in Beaker yet, but usable in the CLI as I understand it
- david4096 8y agoReally excited about scuttlebutt, will make a future post on it, thanks!
- trystero 8y agohypercast - https://github.com/louiscenter/hypercast https://github.com/louiscenter/hypercast
- viach 8y agoInteresting, why there is still no chat-on-blockchain thing. Sounds like an obvious idea for an ICO.
- dmihal 8y ago> Sounds like an obvious idea for an ICO I hate this mindset
- detaro 8y agoThere's a bunch of these things, regrettably.
- viach 8y agoFor example, could you please provide at least 3 (a bunch) examples which are in production?
- send_computers 8y agohttp://lmgtfy.com/?q=blockchain+based+messaging http://lmgtfy.com/?q=blockchain+based+messaging
- 8y ago
- jstanley 8y ago> That means the "servers" hosting it are distributed across a wide network. This is a strange way of saying "you're looking at this site through one centralised server hosted at ipfs.io". Don't get me wrong, IPFS is great. I have released an application that works over IPFS. But I don't think obscuring the difference between a gateway and a node is beneficial. I think the difference needs to be highlighted front and centre, at least until we reach a point where every user is running an IPFS node without realising it.
- boomlinde 8y ago> This is a strange way of saying "you're looking at this site through one centralised server hosted at ipfs.io". No, your rephrasing is completely orthogonal to what they're saying. Both are true. Seems like dishonest nitpicking to me to say that they obscure the difference between a gateway and a node.
- notheguyouthink 8y agoBesides, aren't all nodes basically a gateway? Ie, a gateway is effectively just a readonly node on an accessible IP. Any node could be this if not bound the local net.
- disiplus 8y agosure, but practically probably not, because you would need a domain and a easy way to update it + a cert + thats assuming you are not behind some sort of a NAT and have your own IP.
- boomlinde 8y agoYou don't need a certificate and a domain to run a gateway. For a public gateway, sure, that's desirable (though not strictly required), but for a private gateway (that most nodes are probably running anyway) you really don't need any of that. At home I can just go to http://localhost:[someport]/ipfs/[somehash] http://localhost:[someport]/ipfs/[somehash]. With browser plugins you can also translate ipfs.io gateway URLs to your local gateway.
- asymmetric 8y ago> We can't expect each client to have an ipfs client installed. Couldn't they serve [js-ipfs](https://github.com/ipfs/js-ipfs https://github.com/ipfs/js-ipfs)? AFAIK that would make every user of the web app run an IPFS node.
- sillysaurus3 8y agoThis was very interesting, but sadly: https://github.com/ipfs/js-ipfs/tree/master/examples/exchange-files-in-browser https://github.com/ipfs/js-ipfs/tree/master/examples/exchang... > Note: As js-ipfs@0.29.0 currently doesn't support DHT peer discovery, the peer from which you are fetching data should be within the reach (local or in public IP) of the browser node. The PR to implement DHT has been languishing since May 2017: https://github.com/ipfs/js-ipfs/pull/856/files https://github.com/ipfs/js-ipfs/pull/856/files
- asymmetric 8y ago> The PR to implement DHT has been languishing since May 2017: https://github.com/ipfs/js-ipfs/pull/856/files https://github.com/ipfs/js-ipfs/pull/856/files But it just received an update 4 days ago! :)
- indescions_2018 8y agoThis has potential. In peer brokering at scale, its the individual state of each peer that has to be mediated. The classic "LimeWire" problem. Just wondering as a peer, how much of my metadata gets leaked? Simply determining when or where I am chatting may be enough to de-anonymize me ;)
- EGreg 8y agoCompare to SAFE Network, which may be far more secure but also never seems to launch their alpha :) https://maidsafe.net/docs/Safe%20Network%20Primer.pdf https://maidsafe.net/docs/Safe%20Network%20Primer.pdf
- avaer 8y agoAs a browser author, are there any alternate implementations of WebRTC besides the one all of the browsers use? From my research I was kind of shocked that the answer might be no.
- cjbprime 8y agoA few, e.g. https://github.com/EricssonResearch/openwebrtc https://github.com/EricssonResearch/openwebrtc Surprisingly large amount of dependencies in a conforming implementation. (e.g. SCTP for datachannels!)
- rjsw 8y agoAlso it seems to have been decided that you have to use SCTP-in-UDP (RFC 6951) in order to get though firewalls, which is only implemented in FreeBSD so far, so an implementation will include a userspace SCTP library even if the operating system has it in the kernel as well.
- glandium 8y agoNot that it will help you because it's not open source, but Edge probably doesn't use the same implementation as other browsers.
- dustfinger 8y ago> it's not open source I was wondering if it was. I am disappointed to hear that it is not :-(
- xGnarRx 8y agoHow did "Serverless" become the term for things hosted on servers all over the place? And we already had DHT before serverless became a thing... sigh
- david4096 8y agoPlease do head over to https://github.com/cjb/serverless-webrtc https://github.com/cjb/serverless-webrtc to make issues and PRs! The most painstaking part for me is how long it takes to get the offer in the first place without a useful dialog.
- KirinDave 8y ago> To that end, this demonstration requires you to transfer your offering using some other means, like an email or instant message. While I appreciate the effort that went involved, the effort is identical to serving the app over S3. Without solving this problem with something like IPFS pubsub, there's nothing IPFS-specific about this. It's the hosting for a webapp and a use of browser-based code. In short, this isn't WebRTC over IPFS.
- rhn_mk1 8y agoIs there a version implementing video connections?