[Spice-devel] [PATCH 11/17] Move read, write and locking into the 'Stream' class
Jonathon Jongsma
jjongsma at redhat.com
Wed Feb 21 15:08:20 UTC 2018
On Wed, 2018-02-21 at 10:19 +0100, Lukáš Hrázký wrote:
> > > > I chose short names because I was in that namespace. Otherwise,
> > > > I
> > > > agree with you.
> > > >
> > > > Do you think that the name is still too vague even within the
> > > > namespace?
> > >
> > > I think so. Everything in streaming agent is in that namespace,
> > > even
> > > if
> > > it wasn't, you know you're looking at the streaming agent code
> > > and
> > > think of the types in that context. Stream is still a pretty
> > > generic
> > > name, I suppose you could imagine a number of things under it.
> > >
> > > So what is this class in our case. It handles the socket
> > > communication
> > > over the streaming channel to the server. Is it accurate to call
> > > it a
> > > channel here? If so, maybe StreamingChannel?
> >
> > It's true that "Stream" in the context of the streaming agent could
> > make you think that it was actually representing the encoded video
> > stream, rather than an encapsulation of a communication channel.
> > But I
> > don't like the name StreamDispatcher. Glib uses the name GIOChannel
> > for
> > something similar. Maybe IOChannel?
>
> Could be, but at this moment, the class is specific to the streaming
> 'channel', and I'm not sure if we will make it generic in forseeable
> future (it could be done, but since we don't have other channels atm.
> and may never have, it is not necessary). So StreamIOChannel? Then I
> would just leave out the IO as it seems a bit unnecessary and we get
> to
> the StreamChannel/StreamingChannel?
In my option, the problem with the name StreamChannel/StreamingChannel
is that we already use the name StreamChannel in spice-server to refer
to something else: the spice protocol channel. In this case, we are
talking about a communication channel that is used for control and data
transfer between the agent and server. The server then takes the data
that it receives and sends it to the client via spice using a
StreamChannel object. I think it would be good to avoid using the same
name in two different (but closely-related) projects to refer to
different things.
Jonathon
More information about the Spice-devel
mailing list