Re: A reference to a WebSocket stream

Hi Maxim

>I just wanted to show two options which I'm considering. I was
>considering Collection as an option, because both collection and
>stream are set of members. Although they probably should be disjoint
>classes, because collection should (or may) be navigateable (with the
>first and last links and others) and stream is definitely not.

I was wondering whether you need to subclass anything. WebSocket streams are 
using different Url scheme ("ws" I think), thus it's already descriptive 
enough to make a distinction between the calling protocol of such a 
resource.
As for acknowledging it as a collection - indeed it's an ... unhealthy 
approach. Navigation is not the only issue - the stream may give different 
response each time you connect to it, thus the only fact that supports the 
approach of a collection being there is that the stream serves messages, 
making it effectively a collection of messages.

I think knowing that this is a resource callable over WebSockets protocol is 
enough to tell the client that it is a stream (collection?) of messages.

Regards

Karol Szczepański

Received on Monday, 30 November 2015 19:09:12 UTC