Consider migrating to crossws #548
Replies: 2 comments 1 reply
-
crossws could be another |
Beta Was this translation helpful? Give feedback.
-
That is my strategy in apollo-server-integrations/apollo-server-integration-h3#65.
Right, the current implementation here seems stable. There are a few performance benefits of the design of crossws (eg avoiding heavy per-connection events, see "An API designed for speed" under https://bun.sh/docs/api/websockets#start-a-websocket-server). Moreover, in some of the implementations you have to keep track of all clients, which has additional memory costs and problems when scaling horizontally, Line 77 in 6013eb5 But I agree that currently there is not too much benefit. Perhaps the additional cloudflare adapter in crossws is the biggest plus (and I'm currently looking into adding azure web pubsub there). I just wanted to let you know about crossws and trust your judgment 😸 |
Beta Was this translation helpful? Give feedback.
-
crossws is a new effort by the nuxt team to implement websocket servers across different platforms. Based on a quick look at the code, it should be relatively straightforward to migrate from the custom adapters in
src/use
to crossws. That would allow you to focus more on the graphql interface and mostly ignore the underlying websocket implementation.(You probably want to wait a little bit until crossws' api gets more stable.)
Beta Was this translation helpful? Give feedback.
All reactions