[undertow-dev] WebSocket sending back pressure

Stuart Douglas sdouglas at redhat.com
Thu Jul 7 20:25:26 EDT 2016


Cancellation might be possible to implement, however obviosly once the
message has actually started sending it will no longer be possible to
cancel.

If you create a JIRA I will look into it.

Stuart

On Thu, Jul 7, 2016 at 10:27 PM, peter royal <peter.royal at pobox.com> wrote:
> The flush method on *FrameSinkChannel channels? I could use that to see
> if a message had been sent, but how might that be incorporated into a
> back pressure algorithm?
>
> At my application level I have the notion of a 'topic' that a WS message
> is sent on. For most topics only the most recent message is the one that
> matters. For those topics I was going to use the WebSocketCallback to
> only allow one at a time to be queued on the WebSocketChannel.
>
> -pete
>
> --
> (peter.royal|osi)@pobox.com - http://fotap.org/~osi
>
> On Thu, Jul 7, 2016, at 07:13 AM, Jason T. Greene wrote:
>> There is also a flush method on the channel if it's helpful.
>>
>> > On Jul 7, 2016, at 7:10 AM, peter royal <peter.royal at pobox.com> wrote:
>> >
>> > I looked some more and cancellation would be a huge change - I'm going
>> > to see how far I can get by using the existing callback for flow
>> > control.
>> >
>> > -pete
>> >
>> > --
>> > (peter.royal|osi)@pobox.com - http://fotap.org/~osi
>> >
>> >> On Wed, Jul 6, 2016, at 09:43 PM, Stuart Douglas wrote:
>> >> Some of the methods take a WebSocketCallback that will notify you on
>> >> completion or error, however at the moment there is no way to cancel a
>> >> message.
>> >>
>> >> Stuart
>> >>
>> >> On Thu, Jul 7, 2016 at 6:56 AM, peter royal <peter.royal at pobox.com>
>> >> wrote:
>> >>> I am finding that sometimes I have WebSocket connections that are unable
>> >>> to flush messages out the socket at the rate I am generating messages.
>> >>>
>> >>> I'm using the core.WebSockets class to send messages. Is it possible to
>> >>> achieve this with what exists currently? My initial guess is no..
>> >>> conceptually it would be nice for core.WebSockets to return a
>> >>> CompletableFuture-style object that would let me get a callback when the
>> >>> message is sent, or have the ability to cancel it if it is still sitting
>> >>> in the send queue.
>> >>>
>> >>> I'm happy to help build something into Undertow if it is a welcome
>> >>> addition.
>> >>>
>> >>> -pete
>> >>>
>> >>> --
>> >>> (peter.royal|osi)@pobox.com - http://fotap.org/~osi
>> >>> _______________________________________________
>> >>> undertow-dev mailing list
>> >>> undertow-dev at lists.jboss.org
>> >>> https://lists.jboss.org/mailman/listinfo/undertow-dev
>> > _______________________________________________
>> > undertow-dev mailing list
>> > undertow-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/undertow-dev
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list