Live data from Hacker News

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

github.com

1–10 of 87 posts

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

#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...

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

#7

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?

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).

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

#8

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?

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?

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

#9
post #2

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

I think the best solution would be to write a Python binding to µWS. You will not be able to implement this perf / memory footprint in Python itself.

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

#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 ?
Post reply on HN