hashrocket / websocket-shootout

A comparison of websocket servers in multiple languages and frameworks
MIT License
428 stars 76 forks source link

Added Rust to the shootout #3

Closed glademiller closed 8 years ago

jackc commented 8 years ago

Thanks! I was hoping to see what Rust could do, but I didn't have the expertise to write it myself.

jackc commented 8 years ago

The echo and broadcast responses should be formatted in JSON. I was able to hack that together via string interpolation but I'm sure I didn't idiomatically.

Once that was done I ran the benchmark against it. It wasn't able to complete. The server consistently terminated all connections when it got to 100 connections. Not sure what is going on here.

glademiller commented 8 years ago

Yeah I'm unfortunately not a Rust expert so there is probably something I'm missing. I'll post something over on /r/rust on Reddit to see if someone with more experience can remedy the situation.

glademiller commented 8 years ago

Actually I know what is going on I accidentally removed some code when I added the argument parsing. The code in question set the max connections to 100000 over the default 100 I'll have another PR shortly.

steveklabnik commented 8 years ago

I'm also watching this thread, let me know if I can help at all.

glademiller commented 8 years ago

I opened another PR here https://github.com/hashrocket/websocket-shootout/pull/10. @steveklabnik feel free to fix any obvious non-rustims or inefficiencies you see in the code. I'm sure they are there.