[Y-devel] Fw: Somethoughts about Y)

Nurul Choudhury nurulc at yahoo.com
Sun Mar 7 17:39:23 GMT 2004




 Hi

 This is a really excellent piece of work, an excellent combination of old
 and new. I have taken the liberty of posting the posting to the entire dev
 list. I am assuming that was your intension. I would like to study this
 further to make my own comments, bat at first reading this is absolutely
the
 type of discussion that need to take place in the Y discussion group. I
 strongly feel that Y is taking a very narrow view to creating an X
 replacement. This does not mean that we stop all development and just
 discuss all day - that is not how great things are done.

 Thanks again for this excellent post.

 Nurul


> ----- Original Message -----
> From: "Jost Boekemeier" <jost2345 at yahoo.de>
> To: <nurulc at yahoo.com>
> Sent: Saturday, March 06, 2004 1:14 PM
> Subject: [inbox] [Y-devel] About server-side widgets (was: Re: [Y-devel]
> Somethoughts about Y)
>
>
> > Hi,
> >
> > the problem is not so much the missing migration path but the way with Y
> > handles the client-server protocol.
> > Until now the cs protocol is not fixed because additional widgets may be
> > written for the server. This requires certain actions on the
> > client-side.
> >
> > The problem is that the server-side widgets define the communication
> > protocol, not the other way 'round.
> >
> >
> > > Let us assume that Y significantly improves the interactive response
> > of
> >
> > My tests with Y suggest that a widget based communication protocol
> > cannot compete with a vector-picture based communication protocol (see
> > below).
> >
> > With Cairo (www.freedesktop.org) and XCB (www.freedesktop.org) your
> > points #4, 5, 6, 7 are solved on the client-side (see "XCB: An X
> > Protocol C Binding" by Massey and Sharp), which will be distributed with
> > the upcoming version of Fedora Linux.
> >
> > In a similar approach the X11 network overhead was cut down to 1/70
> > (sic!), so that it is now possible to access a KDE desktop via a 9600
> > baud handy (this should be part of the next version of KDE, too).
> > (www.nomachine.com, www.kde.org).
> >
> > So please do not compare the current X11 with Y. The current xlib does
> > introduce latency, has problems with threads etc. Red Hat and others
> > have already announced that they will ship their packages with the new
> > X11 client implementations.
> >
> > So the question is not "can Y compete with X11 as it is" but "can Y
> > compete with the new X11 implementation?"
> >
> >
> > There are 5 possibilities to implement the network protocol:
> >
> > 1. all widgets on the client side, server receives compressed delta
> > images. Example: VNC
> >
> > 2. one widget prototype on the server, client libraries extend from this
> > widget prototype to implement widgets on the client-side. Example:
> > current X11 implementation.
> >
> > 3. only top-level windows on the server, client libraries implement all
> > widgets on the client and send vector drawing requests to the server
> > window. Example X11+Cairo.
> >
> > 4. all widgets on the server side, non-standard server widgets must
> > extend from one of the standard widgets an implement the missing logic
> > on the client side.  Example: Y.
> >
> > 5. all widgets on the server side, server widgets must be uploaded to
> > the server prior to program execution. Example: NeWS (not exactly, I
> > think there were some pre-defined widgets).
> >
> > I think it's clear that #1, #5 are useful only in local networks. #2 has
> > the problem that each and every client-widget must be accompanied by a
> > server-side window. This client-server mixture makes the programming
> > difficult and may introduce unwanted latency.
> >
> > So it might be a good idea to compare the remaining extremes: #3: all
> > widgets on the client side compose a vector image of the application on
> > the client and then send the required drawing requests to the server vs.
> > #4: all widgets on the server side but clients extend the functionality
> > on the client-side (note: this may degenerate to #2):
> >
> > So I have taken the current swing/cairo implementation, created a window
> > with 1000 push buttons nested inside another and rendered this onto a
> > X11 display on a P100.  The same test with Y.
> > Neither X11 nor Y were hardware-accellerated.
> >
> >
> > The result was exactly what I've expected, Y spent most of the time
> > composing the widget hierarchy on the server-side while Cairo send only
> > a few hundred vector drawing requests to the server.
> >
> >
> > I think Y should drop this strange idea of composing a widget hierarchy
> > on the server-side and introduce only one server-side construct: a
> > top-level window. All clients then implement the complete widget
> > hierarchy on the client side.
> >
> > The client creates a widget hierarchy and the Y client library then
> > calculates the surface of the hierarchy and creates a vector picture
> > which it sends as a sequence of drawing requests to the corresponding
> > server window.
> >
> > The server communicates with the widget hierarchy on the client by
> > sending mouse, keyboard events that happened inside the top-level window
> > at position x/y.  The client reacts by sending the server window the
> > parts of the vector picture that must be redrawn.  However, unless the
> > server runs out of memory no window on the server side ever sends an
> > expose event to the widget hierarchy on the client.
> >
> > I think this is a more reasonable approach than "all widgets on the
> > display-server side", because compute servers running applications
> > usually have more cpu power to compute the resulting surface of a widget
> > hierarchy into a vector picture  than laptops or palmtops on which the
> > display server runs. BTW: How do you handle out of memory conditions if
> > the render process on the display server consumes too much memory?
> >
> > It's just that the graphics hardware chips can very well accelerate the
> > drawing of vector pictures (some may even accelerate 3d), but I haven't
> > yet seen a graphics CPU that can render a widget hierarchy into a plain
> > picture (or image).  So it's better to flatten the hierarchy on the
> > machine that has the CPU power and then send a series of drawing
> > requests to the output window managed by the display server. Unlike the
> > rendering of the widget hierarchy this _can_ and should be hardware
> > accelerated.
> >
> > So I suggest to replace the various widgets on the server with a
> > top-level window construct, define a vector-based communication protocol
> > so that the server- and client-side can be developed in parallel.
> >
> >
> >
> >
> >
> >
>




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved