Is there a way to use pub-sub publishing (a la App::publish or Websocket::publish) with multi-fragment outgoing messages? #1850
Unanswered
brianchesko
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking through the library, I'm not sure if I'm missing something conceptually or there's just not support for topic-based fragmented publishing.
This seems relatively straightforward to do manually with the
uWS::WebSocket::send{First,,Last}Fragment
functions and iterating over clients, but one of the selling points of this library for me is the topic-based communications, which lines up up nicely with our mostly broadcast messages. Is there a way to still write to topics (and therefore N clients at once) but provide a similar breakdown of messages?For context on my use case, I'm currently updating a server application to use uWebSockets instead of websocketpp, which is no longer supported and also missing some features.
In particular, we're sending a lot of large messages which are causing cascading TCP retransmission errors with some clients. A simple change which would help tremendously would be to decrease the size of the fragments, especially if less than that of the MTU.EDIT: I've since writing been learn-ed more about tcp, and it sounds like this won't actually help once backpressure starts due to the negotiated MSS. The application we've used this strategy on successfully in the past was actually UDP and application-level reliability, not TCP.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions