enisdenjo / graphql-ws

Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.
https://the-guild.dev/graphql/ws
MIT License
1.72k stars 155 forks source link

µWebSockets #61

Closed kevinwei00 closed 3 years ago

kevinwei00 commented 3 years ago

Haven't properly evaluated this library yet, but was wondering if you have taken a look at https://github.com/uNetworking/uWebSockets.js ?

enisdenjo commented 3 years ago

Hey hey, thanks for opening this issue!

Honestly, I've never heard of µWebSockets 😅. It looks great in terms of performance, but, following the brief glance I had - thats where the features end haha.

I'd love to know more, can you elaborate a bit on the pros and cons of this library? Why, except for the performance boost, do you choose µWebSockets over ws?

Furthermore, it would be possible for the server library to take in a custom WebSocket implementation. Something like the client does. The only requirement for the implementation would be having the same interface as ws.

enisdenjo commented 3 years ago

I stumbled across a Medium article called: "Beware of uWebsockets.js!". It pushed very important problems about the library, mainly the author. TBH, I don't like what I've read...

Performance or Security? I'll choose security any time of the day.

P.S. I still wouldn't mind allowing a custom WebSocket implementation for the server (all implied risks with the custom implementation lay on the user then). Of course, keeping the requirement of it being a ws server compatible interface.

kevinwei00 commented 3 years ago

@enisdenjo Thanks for the detailed response! And one that other devs must know about as well. I was really just scanning its performance claims 😅 .

enisdenjo commented 3 years ago

Of course! Thank YOU though, with this issue we have learned something new about the world. 😄

ivarsg commented 3 years ago

@enisdenjo, @kevinwei00 and other devs, I think it is worth to read also Alex Hultman's (author of µWebSockets) thoughts on the above mentioned Manuel Astudillo's article. There are always two sides of the medal, two truths of the opposite opinions :)

enisdenjo commented 3 years ago

Awesome! Thanks for sharing the post, there sure are two sides of every story. 😅

evenfrost commented 3 years ago

Honestly speaking, I think this response is childish and insulting itself, and only proves Manuel's assumptions on the library author.

enisdenjo commented 3 years ago

Manuel had good points, Alex had too - but this is just grownups being childish.

Alex literally gained nothing by following his moral compass and ditching the forever growing, community trusted, npm; because "he finds their Terms of Service repulsive, from a purely legal standpoint". He now has to (and will probably have to forever) hold a link to "A note on speculations, lies & allegations" in the main readme of the lib. And even with this, Google being Google - I managed to stumble across Manuel's article first. xD

Not only this, but to feel safe (since you cant just rely on Git tags, nor cant you just rely on humans) - you have to fork, make sure you have the tools to build the lib, build it, package it, deploy it manually to all your services; instead of just doing yarn add uws. He basically twisted all our hands; I, personally, would end up avoiding the lib simply because of the hassle, whatever the performance gains are...

Furthermore, he DID delete that issue. Whatever the reason, he did it. We now can only trust his word that it was actually what he said it was.

enisdenjo commented 3 years ago

:tada: This issue has been resolved in version 2.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

maxpain commented 3 years ago

I've done integration here

enisdenjo commented 3 years ago

:tada: This issue has been resolved in version 4.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

enisdenjo commented 3 years ago

@kevinwei00 good news, the integration has landed with v4.4.0. Would be awesome if you could try it out, given free time. 😄