Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Too bad the demo doesn't work, I was really excited for this. Regardless, big congratulations to the Socket.IO team for an awesome feature! And props to Feross for his simple-peer module, he is doing incredible work in the WebRTC world.

In other news, to address some of the comments here:

- As others have mentioned, https://github.com/sockjs is an alternative that is more lean with less features.

- I've also written an inverse websocket tool that behaves like a regular HTTP request/response, but will proxy it through WebSockets or fallback to JSONP. I really like this approach because it feels more RESTful, has less overhead, and even allows the browser to do a `createServer`. It is currently pretty tightly coupled into a project of mine (next bullet), I'll try pulling it out into its own library if there is demand, but here is the source:

- - Client library, https://github.com/amark/gun/blob/master/gun.js#L1138 and onwards.

- - Server library, https://github.com/amark/gun/blob/master/lib/wsp.js#L8 and onwards.

- - Really nifty HTTP normalizer, https://github.com/amark/gun/blob/master/lib/http.js .

- - Really nifty WebSocket normalizer, same format, https://github.com/amark/gun/blob/master/lib/ws.js .

- - Really nifty JSONP normalizer, same format, https://github.com/amark/gun/blob/master/lib/jsonp.js .

- If you do use the P2P Socket.IO feature, the next thing you'll need is a P2P database that can run in the browser! And that is what my main open source project, http://gunDB.io/ is about. The previous bullet's code is my nimble websocket and fallback library I wrote for this project, and that is why they are currently tightly coupled - sorry about that. If there is enough demand for it by itself then I'll try making it into its own library.

Cheers!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: