Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference
Total Page:16
File Type:pdf, Size:1020Kb
USENIX Association Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference Monterey, California, USA June 10-15, 2002 THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2002 by The USENIX Association All Rights Reserved For more information about the USENIX Association: Phone: 1 510 528 8649 FAX: 1 510 548 5738 Email: [email protected] WWW: http://www.usenix.org Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes. This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. The Future is Coming: Where the X Window System Should Go Jim Gettys Cambridge Research Laboratory, Compaq Computer Corporation. [email protected] Abstract tectures. Changes to the X infrastructure in recent work make this retrofit appear feasible, enabling a much more dynamic view of applications. And applications must be able to adapt between very different resolution displays The X Window System was developed as a desktop win- (more than an order of magnitude) and differing pointing dow system, in a large scale (for its time) campus scale devices. network environment. In the last few years, it has es- caped the desktop and appeared in laptop, handheld and In this paper, I cover the changes and infrastructure re- other mobile network devices. X from its inception has quired to realize this vision, and hope to demonstrate been a network transparent window system, and should a compelling part of this vision in action. This vision, thrive in this environment. Mobility forces a set of issues I believe, provides a much more compelling vision of to surface that were only partially forseen in X’s design. what it means for applications to work in your network, For one reason or other, the hopes for the design were and with the advent of high speed metropolitan and wide not entirely realized. area networks, and PDA’swith high speed wireless net- works, will provide a key element of the coming perva- Our original view of X’s use included highly mobile sive computing system. individuals (students moving between classes), and a hope, never generally realized for X was the migration of applications between X servers. Toolkit implementers typically did not understand and share this poorly enun- ciated vision and were primarily driven by pressing im- 1 Introduction mediate needs, and X’s design made migration or repli- cation difficult to implement as an after thought. As a result, migration (and replication) was seldom imple- mented, and early toolkits such as Xt made it very dif- The X Window System [SG92] architecture lay fallow ficult. Ironically, Emacs is about the only widespread for at least five years, roughly the period from 1995- application capable of both migration and replication, 2000, though many of the extensions defined after the which avoided using any toolkit. base X11 architecture were questionable at best [Get00]. The good news is that the original X architecture en- You should be able to travel between work and home abled the development of desktop systems such as or between systems running X at work, and retrieve Gnome [dI99] and KDE [Dal99]. But to again match your running applications (with suitable authentication and then exceed other systems such as Microsoft Win- and authorization). You should be able to log out, and dows and Apple’s Aqua [App] in all areas, serious fur- “park” your applications somewhere until you retrieve ther work is necessary. This paper attempts to outline them later, either on the same display, or somewhere areas where base window system work is required to else. You should be able to migrate your application’s again make X competitive with other current commer- display from a handheld to a wall projector (for example, cial systems, but specifically toward use in the current your presentation), and back again. Applications should large scale network environment. be able to easily survive the loss of the X server (most commonly the loss of the underlying TCP connection, I believe that migration and replication of running X ap- when running remotely). plications is key to the near term future environment. A number of issues made replication and/or migration dif- There are challenges not fully forseen: applications must ficult. These include (and some of which are discussed be able to adapt between highly variable display archi- in detail in [GP01]): Fonts have been server side objects, and there is transparency, presents the problems of large scale dis- no guarantee the fonts available on one server are tributed systems. It is infeasible to update all X servers available on the other (slightly mitigated by the ex- to support new font technology. istance of font servers. The X extension mechanism is at best only a partial so- Graphics operations in X can be made to drawables lution, since if an application relies on an extension’s (windows or to off screen memory, “pixmaps”). existance, it cannot be deployed until the X server has The X protocol only guaranties 1 bit deep draw- been upgraded. Many older systems can never be up- ables. Displays of different depths might share no dated with new X extensions. Application developers other depth. Futhermore, early toolkits typically won’t use a new feature if it badly restricts the market did not handle image rendering at all, exposing this for their software. disparity of displays completely to applications. Applications that will work (even if somewhat slowly) Resource ID’s (for windows, pixmaps, fonts, etc) always trump applications that won’t run at all, from the and Atoms are per server identifiers, and have to be point of view of an ISV (who wants to sell product), or remapped. These were typically exposed directly to an open source developer who wants their application applications, though sometimes with some abstrac- widespread. tion (for example, partially hidden in a widget data structure). Pseudocolor displays again presented toolkits, ap- 2.2 Historical Observation about Opaque plications, or pseudoservers major headaches: there Server side fonts would be no guarantee the color resources would be available when needed. It took longer for pseu- docolor to become unimportant than expected due From the beginning, X’s minimalist font abstraction has to the not fully understood economics that drove presented challenges to applications interested in serious displays down market at the same functionality. typography. Due to X’s inadaquacies, serious applica- Thankfully, monochrome (1 bit) and pseudocolor tions from the very beginning of X’s history have had to displays are now a thing of the past, for all intents work around X’s fonts, and that coordinating X’s fonts and purposes. with those required for printing has been a 15 year long migrane headache. Authentication and authorization XXX FILL IN XXX. Applications need sufficient information for either X’s use, or for printing use (something we ignored in the de- sign of the X protocol). So to be useful to applications on systems, any access to fonts must be able to access 2 Client Side Fonts *any* information in the font files, since they will con- tinue to evolve. While server side fonts clearly provide major headaches There have already been four generations of font formats for migration and replication (since there is no guarantee over X’s history: that the fonts the application needs are available on the X servers being used), client side fonts are needed on Bitmap 1983-1990 general architectural grounds. This section lays out why. Speedo 1991 2.1 Large Scale Distributed Systems Deploy- Type1 1992 ment TrueType 1997 In large scale commercial systems, applications are often OpenType, in the short term future represents a fifth for- run remotely from the X server to a desktop system or mat. Approximately every 5 years, there is likely to X terminal, and therefore applications won’t be deploy- be a new generation/format for font files, with increas- able until both ends of the communcations have been ing quality (along some dimension, whether it be typo- updated. The X Window System, due to its network graphic, or character set, . ). Any server side font so- lution, therefore, will always be difficult to deploy and fewer server round trips chasing a moving target. incremental behavior: no long startup delays for As each new font technology has deployed, applications font rendering have always needed to access the new data contained in the font files for the new information. X itself has not faster startup time evolved to do more than rendering the bits on the screen, applications can directly access font files to enable and has made it difficult or impossible for applications printing to share this information. future font formats can be added without Over this period, fonts themselves have become much client/server deployment interdependencies. larger. When X was designed, fonts typically had fewer than 128 glyphs (ascii), and the number of fonts were an application is guaranteed that the fonts it needs small, and since the fonts were bitmap fonts, the metrics will be usable on any X server in the network, eas- were static. The number of round trips to retrieve font ing migration and replication of applications. metrics were small, and the size of the metrics them- selves were small. This situation contrasts greatly with the present. 2.3 Remaining work Many modern fonts have thousands of glyphs and hav- ing hundreds or thousands of fonts on a system is now Some data from modern applications show these ben- is entirely commonplace. Searching among these fonts efits [Pac00a] at current screen resolutions (typically for coverage of correct style and code point coverage re- 100DPI); more data on a wider selection of applications quires applications to retrieve (typically at startup) very is needed to confirm this early data.