users@tyrus.java.net

Re: TyrusSession.broadcast enhancement

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Wed, 04 Dec 2013 12:45:43 +0100

Hi Gerard,

sure, makes sense. (Although we could not use JDK 8 features yet... ehm) :-)

Feel free to file new RFE agains Tyrus. The other option might be doing
some tiny internal cache and then user should be able to have similar
advantage with possibility to use lambda expressions on result of
Session.getOpenSessions().. maybe I like this a little bit more than
adding broadcast method.

Anyway, even this might be resolved as part of solution of RFE you are
going to file, so please do it.

Thanks!
Pavel

ps.: did you have any interesting questions or feedback related to
WebSocket/Tyrus?

On 04/12/13 11:40, Gerard Davison wrote:
> So I was doing a presentation on WebSockets yesterday and it occurred to me that the “broadcast” method should really be extended so allow some kind of filtering on which connections the events is sent to, for example
>
> peer.broadcast(s -> s.getUserProperties().contains(“NAME”)).message(message);
> or
> peer.broadcast(message, s -> s.getUserProperties().contains(“NAME”));
>
> Does this seem reasonable for a range of use cases, if so I will raise a ER.
>
> Gerard
>
>
>