Re: A reference to a WebSocket stream

Hi Karol,

> I was wondering whether you need to subclass anything.

Maybe you're right, right now I don't have any argument for a subclass
of hydra:Resource or a plain hydra:Resource + ws[s] schema.

Cheers,
Maxim

On Mon, Nov 30, 2015 at 10:08 PM, Karol Szczepański
<karol.szczepanski@gmail.com> wrote:
> 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 Wednesday, 2 December 2015 16:22:44 UTC