Live data from Hacker News

Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

gun.io

21–28 of 28 posts

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#21

Earlier quoted context omitted.

Couldn't you just connect the uploader's POST to the downloader's GET request instead of using websockets?

This seems to be more of a streaming upload/download. Node just basically pipes along the chunks from the serving peer through the websockets. I'm pretty sure that if you just "connect the uploader's POST to the downloader's GET" then the Node server would have to buffer the entire file from the submitter before sending it to the clients.

> I'm pretty sure that if you just "connect the uploader's POST to the downloader's GET" then the Node server would have to buffer the entire file from the submitter before sending it to the clients.

Not at all. Use stream.pipe(). I've done it countless times and it works really well.

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#22
Great stuff, and maybe also a step towards a content-centric web, which is indifferent about where content comes from, only that it's precisely what the audience requested.

Though WebRTC might be the 'right', standards-based way for peer-to-peer web communications, I'd be wary of depending on it arriving, with the right features, in any necessary time frame. Incumbent-organization standards efforts often don't deliver with the boldness and promptness that edge innovation needs.

Maybe you'll need to give (some subset of) users a plug-in or node.js daemon, that runs alongside their browser as a connectivity hack-around, in the meantime. Aesthetically impure, yes, but such compromises are another kind of 'schlepping' that sometimes enables breakaway project success.

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#23
post #13

Try http://ge.tt

This is a good example of what the OP is trying to replace. Current file-sharing solutions almost exclusively follow the same pattern: You upload a file which some server stores on disk, then a friend gets a url and can go download it.

Presumably this new service is less expensive to run because there's no disk storage involved, just a central server providing bandwidth and a little bit of RAM to buffer with. And presumably with WebRTC it won't even need that, and will just become a service to easily connect browsers.

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#24

Not really P2P - I see that you're aware of this and working on it. Really cool stuff. Why can't I drag-> drop files in?

So is this not "true" P2P because a node.js server sits in the middle?

Having a central server sit in the middle that all traffic goes through goes right against the very definition of P2P.

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#25
post #22

Great stuff, and maybe also a step towards a content-centric web, which is indifferent about where content comes from, only that it's precisely what the audience requested. Though WebRTC might be the 'right', standards-based way for peer-to-peer web communications, I'd be wary of depending on it arriving, with the right features, in any necessary time frame. Incumbent-organization standards efforts often don't delive…

I'm not sure I follow. This new service requires cooperation with a specific browser on the other end of a centralized service in order to get any content at all.

Compared to a uniform resource locator on top of a dynamic, distributed naming system connected by a robust, global packet-switching network, I'd say this new system is way less "content-centric" and way more sensitive to the content's source.

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#27
post #22

Great stuff, and maybe also a step towards a content-centric web, which is indifferent about where content comes from, only that it's precisely what the audience requested. Though WebRTC might be the 'right', standards-based way for peer-to-peer web communications, I'd be wary of depending on it arriving, with the right features, in any necessary time frame. Incumbent-organization standards efforts often don't delive…

I'm not sure I follow. This new service requires cooperation with a specific browser on the other end of a centralized service in order to get any content at all. Compared to a uniform resource locator on top of a dynamic, distributed naming system connected by a robust, global packet-switching network, I'd say this new system is way less "content-centric" and way more sensitive to the content's source.

You're right; I'm projecting my own hopes about what a pure-JS, all-in-browser peer-to-peer sharing stack could do, rather than considering just the specifics of this quick-and-dirty shared folder approach (which isn't even yet p2p, though that's clearly the hope).

Once the remaining browser pieces are in place (via either WebRTC or another shim), a content-centric DHT beyond just shared folders could be the next step. You could have "trackerless torrenting in a tab". Or even "Tor-in-a-tab".

Re: Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in Node.js + Socket.io)

#28

Great work. Do you guys host this yourself on EC2? Also, would be great to get SSL transfers.

Hmm, if this will be a real p2p, then your data would not transfer thru server, so developers must to implement SSL(or some other kind of secure connection) in their client-side software.
Post reply on HN