Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!cse!evax!walt From: Buehring@Intellection.COM (Walt Buehring) Newsgroups: comp.windows.x Subject: Robust multi-display clients Message-ID: Date: 4 May 91 22:33:16 GMT Sender: usenet@cse.uta.edu (USENET Dummy account for GNUS and TheNews) Distribution: comp Organization: Intellection, Inc. Dallas, Texas Lines: 61 Question (in a nutshell): How do *you* go about writing an X application that displays windows on many X servers, is insensitive to remote server crashes, provides reasonable interactive response time to all users, and does not consume oceans of virtual memory? Possible answers: 1. Within a single process open a separate connection to each display and use XtAppPending, XtAppProcessEvent and friends to dispatch events from each display. Advantage: - Single process space consumes least memory. - UI in same process as application eases access to functions and data. - No context switching. Disadvantage: - If a single display crashes Xlib is hosed (right???). - Any event that triggers a lengthy computation causes all displays to wait (perhaps a LONG time). 2. Split UI and application into separate processes and fork a UI process for each display. Communicate with application code thru IPC channel via some home-grown command protocol. Advantage: - Application is insensitive to remote server crashes. - UI and application may run on separate machines if needed. - During lengthy calculations by the application code, user can still refresh windows, pulldown menus, etc. Disadvantage: - You may end up context switching your guts out. - Given the size of Xt and Motif libraries, each UI process may become *huge* and impose severe paging penalties. - Access to application code and data is made cumbersome. This question probably comes up often but I've not been tuned in to this group. I'd appreciate any advice, past articles of interests, pointers to examples, etc. I'm going nuts looking for the "right" answer to this problem -- it'd sure be nice to have some company! :-) A few other details about our application in case it matters. It must support 10-40 users (displays), may embark on calculations that require 10-15 minutes to complete, and must run on Unix and VMS (using DECwindows/Motif). Thanks, \/\/ Walt Buehring Intellection, Inc. Internet: Buehring@Intellection.COM UUCP: uupsi!intell!buehring