home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 11 / IOPROG_11.ISO / docs / mini / lbx < prev    next >
Encoding:
Text File  |  1997-09-02  |  10.5 KB  |  308 lines

  1.  
  2.                               THE LBX MINI-HOWTO
  3.                                        
  4.    Paul D. Smith <psmith@BayNetworks.com>
  5.    v1.02, 17 Jul 1997
  6.    
  7.      _________________________________________________________________
  8.    
  9. Introduction
  10.  
  11.    
  12.    
  13.     _Low-Bandwidth X_ (LBX) attempts to recognize that in this day and
  14.    age, not everyone will be a fast LAN hop or two away from the system
  15.    that they are running their applications on.
  16.    
  17.    The X protocol can generate an extraordinary amount of traffic,
  18.    especially for simple-seeming things such as creating new windows. As
  19.    anyone who has tried to use X over a dial-in modem at 28.8 or even
  20.    higher can attest, creating new X windows can involve an excruciating
  21.    wait.
  22.    
  23.    LBX is fundamentally a compression and caching scheme designed to
  24.    minimize the amount of X traffic generated between two systems.
  25.    
  26. What's The Status Of LBX?
  27.  
  28.    
  29.    
  30.     As of the X Consortium's release of X11R6.3 in December, 1996, LBX is
  31.    a full extension to the X protocol. For XFree86 folks, that's XFree86
  32.    version 3.3.
  33.    
  34. Who Can Benefit From LBX?
  35.  
  36.    
  37.    
  38.     If you use a modem to dial into a service provider, then run X
  39.    applications on remote machines with their DISPLAYs set to your local
  40.    machine (or vice versa), LBX will speed up that connection. Also if
  41.    you set DISPLAYs from systems across WANs (other countries, for
  42.    example) or other slow links, LBX can help.
  43.    
  44. Who Doesn't Need LBX?
  45.  
  46.    
  47.    
  48.     LBX is useless, of course, if you're only running applications
  49.    locally, or if you're not running X at all.
  50.    
  51.    Also, if you're running on a fast LAN, LBX won't be much help. Some
  52.    people say "if LBX cuts down on network traffic, wouldn't it be good
  53.    to use even on fast LANs?" It might be, if your goal is to reduce
  54.    network traffic. But if your goal is to get better response time LBX
  55.    probably isn't what you want. Although it does introduce caching and
  56.    compression, that comes at a cost on both ends (extra memory for
  57.    caching, and extra CPU for decompression). If your link is fairly
  58.    speedy LBX will probably result in an overall slowdown.
  59.    
  60. How Does LBX Work?
  61.  
  62.    
  63.    
  64.     LBX works by introducing a _proxy server_ at the client side, which
  65.    performs caching and compression. The X server knows that the client
  66.    is using a proxy server, and decompresses accordingly.
  67.    
  68.    Here's a normal setup for remote X clients. In our discussion, LOCAL
  69.    is always the workstation sitting in front of you, whose monitor
  70.    you're looking at, and REMOTE is the remote workstation, where the
  71.    actual application is running.
  72.  
  73.      REMOTE                               LOCAL
  74.  +-----+                                             +-----+
  75.  | APP |-\          Network            +----------+  |     |\
  76.  +-----+  \--------------------------->| X SERVER |=>|     ||
  77.  +-----+  /       (X Protocol)         +----------+  +-----+\
  78.  | APP |-/                                          /_____//
  79.  +-----+
  80.  
  81.    
  82.    
  83.    When using LBX, a proxy server (lbxproxy) is introduced on the remote
  84.    side, and the applications talk to that process instead of directly to
  85.    the LOCAL server. That process then performs the caching and
  86.    compression of X requests and forwards them. It looks like this:
  87.  
  88.      REMOTE                                         LOCAL
  89.                                                                +-----+
  90.  +-----+  +-------+           Network            +----------+  |     |\
  91.  | APP |->| PROXY |----------------------------->| X SERVER |=>|     ||
  92.  +-----+  +-------+       (LBX/X Protocol)       +----------+  +-----+\
  93.  +-----+   /                                                  /_____//
  94.  | APP |--/
  95.  +-----+
  96.  
  97.    
  98.    
  99.    Details on exactly what caching and compression LBX does is beyond the
  100.    scope of this document.
  101.    
  102. What Do I Need To Use LBX?
  103.  
  104.    
  105.    
  106.     You need an X server on your LOCAL system which has the LBX extension
  107.    compiled in. Unless you explicitly told it not to when building it,
  108.    X11R6.3 servers automatically enable LBX. Also, all XFree86 3.3
  109.    servers have LBX enabled by default.
  110.    
  111.    You can use the xdpyinfo command to see if your server has the LBX
  112.    extension: run xdpyinfo and look at the list just under "number of
  113.    extensions"; you should see "LBX" listed there.
  114.    
  115.    Next, you need to get an lbxproxy program compiled for the REMOTE
  116.    system. This is the tricky part. If the remote system is not the same
  117.    type as your local system, the lbxproxy on your local system will do
  118.    you no good, of course.
  119.    
  120.    There is unfortunately no "broken out" distribution of lbxproxy, so
  121.    you will have to either (a) get and build most, if not all, of X11R6.3
  122.    for the remote system, or (b) find someplace to get a pre-compiled
  123.    lbxproxy binary for your system. The latter is much simpler of course.
  124.    
  125.    
  126.    The lbxproxy is simply a single executable. There are no configuration
  127.    files, resource files, etc. associated with it.
  128.    
  129. What Don't I Need To Use LBX?
  130.  
  131.    
  132.    
  133.     The REMOTE system _does not_ need a new X server (as always, the
  134.    REMOTE system doesn't need _any_ X server running).
  135.    
  136.    The application you want to run _does not_ need to be linked with any
  137.    special version of X, or any special libraries; I regularly use
  138.    commercial X11R5 apps over LBX with no trouble.
  139.    
  140.    You _do not_ need root or other privileged access on the REMOTE
  141.    system; the lbxproxy process runs under your normal access
  142.    permissions. Further, you can run it right from your home directory:
  143.    it does not have to be installed anywhere.
  144.    
  145. How Do I Start LBX?
  146.  
  147.    
  148.    
  149.     OK, here it is... after all that it's actually quite simple. Replace
  150.    LOCAL and REMOTE below with the hostnames of your local workstation
  151.    and remote system, respectively (don't get them mixed up!)
  152.    
  153.    On LOCAL:
  154.    
  155.        
  156.     1. Start your X server.
  157.        
  158.     2. Use xhost +REMOTE to give the remote system access to your X
  159.        display, if necessary. If you use xauth you may need to do more
  160.        than this; see the _xauth(1)_ man page for more information.
  161.        
  162.    
  163.    
  164.    On REMOTE:
  165.    
  166.        
  167.     1. Start lbxproxy and tell it to forward to the LOCAL X server, like
  168.        this:
  169.  
  170.   $ lbxproxy -display LOCAL:0 :1 &
  171.    
  172.        
  173.        This tells lbxproxy to use display :1 on the REMOTE system; if
  174.        that system has >1 display already you can use :2 or whatever
  175.        instead.
  176.        
  177.     2. Set your DISPLAY environment variable to point to the display that
  178.        lbxproxy is providing, instead of the normal display:
  179.  
  180.   $ DISPLAY=:1
  181.   $ export DISPLAY
  182.    
  183.        
  184.        Or, if you use csh or clones:
  185.  
  186.   % setenv DISPLAY :1
  187.    
  188.        
  189.     3. Start your X applications!
  190.        
  191.    
  192.    
  193.    That's it; all X apps that are started up pointing to :1 will use LBX.
  194.    Of course, there's no reason you couldn't also start X apps pointing
  195.    to LOCAL:0 and have both running at the same time.
  196.    
  197. Problems
  198.  
  199.    
  200.    
  201.     Here are some common problems: Q) lbxproxy exits with an "access
  202.    denied" error. A) Make sure you remembered to use xhost +REMOTE on the
  203.    LOCAL system to give access permissions to REMOTE. Also, remember that
  204.    if you're using xauth you'll need to do other stuff.
  205.    
  206.    Try running a normal X app like xclock on REMOTE and have it display
  207.    on the local system without using lbxproxy:
  208.  
  209.   $ xclock -display LOCAL:0
  210.  
  211.    
  212.    
  213.    If that doesn't work, it's xhost or some other basic X problem, not
  214.    LBX.
  215.    
  216. Documentation
  217.  
  218.    
  219.    
  220.     The only documentation available in a standard X distribution may be
  221.    the _lbxproxy(1)_ man page.
  222.    
  223.    If you have access to the X source tree, then very interesting
  224.    information on LBX is available there: FileFormat
  225.    xc/doc/specs/Xext/lbx.mifFramemaker MIF
  226.    xc/doc/hardcopy/Xext/lbx.PS.Z(Compressed) Postscript
  227.    xc/doc/hardcopy/Xext/lbxTOC.htmlHTML
  228.    
  229.    More detailed discussion of specific LBX algorithms is available here:
  230.    FileFormat xc/doc/specs/Xext/lbxalg.mifFramemaker MIF
  231.    xc/doc/specs/Xext/lbxalg.PS.Z(Compressed) Postscript
  232.    
  233.    If you don't have access to the X11 source, you can obtain these files
  234.    from ftp://ftp.x.org/pub/R6.3/xc/doc/....
  235.    
  236. Alternatives
  237.  
  238.    
  239.    
  240.     If you don't like lbxproxy for some reason: you're not satisfied with
  241.    the performance, it doesn't work for you, you don't want to hassle
  242.    with creating an lbxproxy for the remote host, or you simply are
  243.    interested in trying other options, there is at least one other
  244.    package for X protocol compression (anyone have others?)
  245.    
  246.   dxpc - The Differential X Protocol Compressor
  247.   
  248.    
  249.    
  250.     Original Author: Brian Pane <brianp@cnet.com>
  251.    Current Maintainer: Zachary Vonler <lightborn@mail.utexas.edu>
  252.    
  253.    This program works in essentially the same way as LBX. However, to
  254.    avoid having to implement an X extension and modify the X server code,
  255.    dxpc uses _two_ proxies: one that runs on the REMOTE host, like
  256.    lbxproxy, and one that runs on the LOCAL host.
  257.    
  258.    The REMOTE host proxy communicates between the X clients and the LOCAL
  259.    host proxy, and the LOCAL host proxy communicates between the X server
  260.    and the REMOTE host proxy.
  261.    
  262.    So, to _both_ the X clients and the X server, it looks like X protocol
  263.    as usual.
  264.    
  265.     Advantages
  266.      * Since it's a completely separate application that does not require
  267.        any X internals, it's _much_ simpler to compile and install.
  268.      * It's maintained separately, so you don't have to wait for the OSF
  269.        to release new X versions for enhancements or fixes.
  270.      * It provides more and better compression information and statistics
  271.        than lbxproxy.
  272.        
  273.     Disadvantages
  274.      * It is not a standard part of X; you must obtain and build it
  275.        separately.
  276.      * It is slightly more complex to set up, since it requires a
  277.        LOCAL-side proxy as well as the REMOTE proxy.
  278.        
  279.     Where Can I Get dxpc?
  280.     
  281.    
  282.    
  283.     The source for dxpc is available at ftp.x.org.
  284.    
  285.    There is a WWW homepage for dxpc that gives a lot of good information,
  286.    including pointers to the dxpc mailing list, access to the source
  287.    code, and a number of pre-built binaries for various platforms:
  288.  
  289.   http://ccwf.cc.utexas.edu/~zvonler/dxpc/
  290.  
  291.   Which Is Better?
  292.   
  293.    
  294.    
  295.     I don't know. It shouldn't be hard to run some benchmarking against
  296.    both LBX and dxpc and get both subjective and statistical measurings
  297.    of performance. But I haven't done this, and I don't know of anyone
  298.    who has.
  299.      _________________________________________________________________
  300.    
  301.    
  302.     Paul D. Smith
  303.     
  304.    
  305.      _________________________________________________________________
  306.    
  307.    _Last modified: Thu Jul 17 12:49:24 EDT 1997 _
  308.