From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19226 invoked from network); 23 Jun 1998 15:31:40 -0000 Received: from gatecoms.gatecom.com (198.87.96.251) by mail2.redhat.com with SMTP; 23 Jun 1998 15:31:40 -0000 Received: (from jsturm@localhost) by gatecoms.gatecom.com (8.8.7/8.8.7) id LAA14385; Tue, 23 Jun 1998 11:30:21 -0400 (EDT) Date: Tue, 23 Jun 1998 11:30:21 -0400 (EDT) From: Jeff Sturm X-Sender: jsturm@gatecoms To: axp-list@redhat.com Subject: OFFTOPIC: Re: The new X (was Re: Making programs 64 bit clean) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 22 Jun 1998, Christopher Curtis wrote: > > > Note that in order to produce such a thing it would have to be: > > - network transparent > > Absolutely. Additionally, it would have to better support low bandwidth > environments like 28.8k modems. When X was designed, it was ethernet or > token ring or 1200 baud modems, and they figured it was futile to try to > make it run over 1200 baud (quite correctly, in fact). However, in making > this decision they decided to forego and bandwith considerations at all. > The hack-on LBX extensions serve as a primary example. Many graphics operations are inherently bandwidth-intensive. Even so, many simple optimizations can be made. Xlib make no effort to cache useful information like window attributes for instance; it queries the server each time. The X libraries (and many existing applications) make little or no effort to conserve bandwidth. The LBX extensions operate as a layer between the client and server, and make a best-effort to cache information. It's not a bad idea and definitely not a "hack-on" effort. (Consider HTTP proxy servers; they serve a similar purpose for the Web as LBX does for X.) > > - portable as all hell > > Absolutely. Much more judicous use of unions is needed. Definitely. The X Consortium's sample code had a lot of portability problems. The XFree86 team has tackled some of these, but needs much more help... > > - upwards compatible with X servers/clients. > > Not necessarily. It will need a X server client of it's own (that is, > it's own version of eXceed). ??? I don't understand. eXceed is a commercial X display server for Windows. > > - truely object oriented instead of the half-assed "objects in C" like Xt and > > Motif currently do. > > Absolutely under no circumstances whatsoever. ANSI-C *only*! This is one > of my biggest gripes with the Berlin people. The next is the registry. Good grief. You don't expect to be able to provide a state-of-the-art API in ANSI-C only, do you? That's how the X Consortium got into that Motif/Xt mess in the first place. You certainly can't expect C++/Java/Smalltalk programmers to have to code to an ANSI-C API. There *should* be a vanilla-C API available. There also should be good O-O API's available for those who need them. Whether the display server is written with ANSI-C is an implementation issue, and shouldn't be part of the specification. > > - Good support for accelerated hardware without cutting out "normal" hardware. > > This is the prototypical driver issue. > > > I think you could achieve something like this with a new API that still spoke > > X protocol underneath, providing it wasn't any slower than raw X. Implement > > it in C++ and Java to start, then turn it over to the community to do "my > > favourite language" bindings. > > I suppose Java is a possibility, but I'm a horrid C bigot. I think it's > better to simply address the major failings of X and try to reimplement a > better option. There's a lot of "Why X sucks" links out there as is for > me to go into the details here, but the biggest failing is in colormap > handling. Run X in an 8-bit display sometime for a while. Under Solaris > anyway, colors disappear in time. Netscape (with the -install option) > eventually fades to a very monochromatic grey scheme. Loading it without > -install means other programs won't run (like the GIMP). And with > -install, there's colormap flashing, which really sucks when playing > xboing. Frame Maker doesn't even have the -install option and appears > with no highlights or shadows - everything is just one big block. KDE is > the most amazing window manager in this respect, but the problem persists. Many applications don't use the color models properly. X supports pseudocolor, directcolor, truecolor, whatever... it tries hard to use the hardware resources as best as it can. "Colormap flashing" is a reasonable compromise on displays that are starved for colors. Solaris's X server may be badly broken, I don't know. I have one Sun box here; I can't run Netscape on the console (it dies with a bus error) but it runs fine from my PC with the free Microimages X server. Anyway, with video cards as cheap as they are nowadays, why should anyone be stuck with 8bpp color? > The next problem of X is the bandwidth. X is virtually unusable across an > ISDN, and only marginally better across a T1. A lot can be done here with > built-in proxies for, eg, window manager bitmaps, and at a minimum RLE > compression. Now, I'm no X expert so I may be way off base here, but > another thing that would be nice is an event mask. A lot of applications > don't care when the mouse moves over them - these don't need to be > transfered. Neither do enter/exit messages. Sad to say, but common > dialogs would also be nice - or at least a method of caching and > transferring fixed dialogs so the entire window doesn't have to be > transferred. There *is* an event mask. Most applications don't utilize it, and accept all events (ignoring those it doesn't need). Mouse motion is a big one. Run an xterm over a dialup, move your mouse and see if your modem lights blink. They wont't. BTW xterm is really quite useable over a dialup, because the author actually made an attempt to conserve bandwidth. This is yet another example of programmer laziness. > Then there's the font server. Having a remote display uses the local font > server. This is very confusing and can be quite a limitation. I would > think that at a minimum the font servers should be able to query one > another. Additionally, X should not hang when the font server does it's > thing. I do think that whatever replaces X should be fully multithreaded, > even if that means less portability. :( Font servers weren't intended to be local. They are network resources. They address the problem of having to distrubute fonts to each display server. Unfortunately they are not widely implemented. > These are my major gripes with X, but they are not ones that are easily > repairable - they are faults intrisic to the system. However, a new > defaults mechanism is also needed. There should, IMHO, be three > configuration files for each program - one in .../app-defaults, one in > .../app-defaults/fixed, and one in the user's home directory - just like > the setup for Pine. There should be *NO* registry. You admit you are not an X expert in one sentence, then claim the deficiencies in X cannot easily be repaired. You are criticizing X from a user's point of view, not from its architecture. The configuration files are just such an example. Many portions of the X distribution are not great (Xt comes to mind), but they are optional and no application programmer has to use them... > To be honest, there are some things for X to learn from Windoze. The > WinFrame stuff is pretty efficient (of course, done so at the expense of > configurability, but nonetheless...) WinFrame is very expensive on the application server. Try to connect 5 users to your WinFrame server, then 10, then 20. Watch what happens to memory/CPU utilization. This claim is absurd. What makes WinFrame over win32 a better hack than LBX? Instead of bashing X, why not think of real ways it can be fixed? Starting over with a new window system from scratch is *not* the answer. We need something that will be done before 2010... Jeff