Live data from Hacker News

uWebSockets: Scalable WebSocket server library for Node.js and C++11

github.com

11–20 of 87 posts

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#11
post #10

I'm currently using the `ws` library for a custom live-streaming solution (broadcasting binary data) and the memory/CPU usage is indeed not small for a handful of clients. What does `uws` bring new (technically) to the table?

What can of live feed are you using/trying to read ? I'm very interested in this, can you give me details ?

Something like this [1]. It can go over 20fps and looks pretty smooth on iOS devices, no sound though.

[1] http://phoboslab.org/log/2013/09/html5-live-video-streaming-...

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#12

Earlier quoted context omitted.

There is nothing new brought to the table, feature wise. Same old ws interface, you keep your current code unchanged. Swap require('ws') with require('uws') and see how it works for your code, report any issues if you need them fixed. Well, of course there is a 20-30x perf boost, 10-40x memory improvement compared to ws (as the benchmark table shows).

Yes, I've seen the very simple integration, I'll definitely give it a try. I was actually curious how you've achieved that performance boost?

I get this question quite often, here is a good start: https://github.com/alexhultman/uWebSockets/issues/56

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#13

Earlier quoted context omitted.

Yes, I've seen the very simple integration, I'll definitely give it a try. I was actually curious how you've achieved that performance boost?

I get this question quite often, here is a good start: https://github.com/alexhultman/uWebSockets/issues/56

Cool, hope it's ok for others to read

https://www.reddit.com/r/cpp/comments/4ccpsa/%C2%B5websocket...

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#14
post #6
post #2

Anything similar in Python? Currently using pypy+tornado-sockjs. Works OK.

Maybe uvloop? "Uvloop: Fast Python networking" https://news.ycombinator.com/item?id=11625585 Maybe paired with Growler: "Growler: Asyncio Micro-Framework in Python" https://news.ycombinator.com/item?id=11632181 "Simple websocket server with uvloop.": https://gist.github.com/kracekumar/daf10b3be3191a78b037c0c79...

No offence, but I don't think you fully grasp the situation here. This is an extremely optimized fully native server written with low-level CPU awareness. You can absolutely not, in any possible way, write this in Python.

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#15

Earlier quoted context omitted.

I get this question quite often, here is a good start: https://github.com/alexhultman/uWebSockets/issues/56

Cool, hope it's ok for others to read https://www.reddit.com/r/cpp/comments/4ccpsa/%C2%B5websocket...

https://www.youtube.com/watch?v=fN1WBgS9u_E

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#16
post #10

Earlier quoted context omitted.

What can of live feed are you using/trying to read ? I'm very interested in this, can you give me details ?

Something like this [1]. It can go over 20fps and looks pretty smooth on iOS devices, no sound though. [1] http://phoboslab.org/log/2013/09/html5-live-video-streaming-...

May i suggest you to take a look on https://github.com/131/h264-live-player (with ws :p)

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#18
post #17

I'm already using it on a socket.io production server. Super-stable for days, and noticeably less cpu / memory usage. Great open source software !

Yep, thanks for being one of the first adopters :)

Like mentioned, it works as an optional engine in Socket.IO, Primus & SocketCluser (in which it will be default in version 5).

No code change, swap when you feel lucky :P

Re: uWebSockets: Scalable WebSocket server library for Node.js and C++11

#19
post #16

Earlier quoted context omitted.

Something like this [1]. It can go over 20fps and looks pretty smooth on iOS devices, no sound though. [1] http://phoboslab.org/log/2013/09/html5-live-video-streaming-...

May i suggest you to take a look on https://github.com/131/h264-live-player (with ws :p)

[deleted]
Post reply on HN