Client/Server Based Statistical Computing
Total Page:16
File Type:pdf, Size:1020Kb
Client/Server Based Statistical Computing DISSERTATION zur Erlangung des akademischen Grades doctor rerum politicarum (dr. rer. pol.) im Fach Statistik und Okonometrie¨ eingereicht an der Wirtschaftswissenschaftliche Fakult¨at Humboldt-Universit¨atzu Berlin von Herr Dipl.-Kfm. Heiko Lehmann geboren am 26.06.1970 in Berlin Pr¨asident der Humboldt-Universit¨at zu Berlin: Prof. Dr. J¨urgen Mlynek Dekan der Wirtschaftswissenschaftliche Fakult¨at: Prof. Michael C. Burda, Ph.D. Gutachter: 1. Prof. Dr. Wolfgang H¨ardle 2. Prof. Oliver G¨unther, Ph.D. eingereicht am: 02. April 2004 Tag der m¨undlichen Pr¨ufung: 12. Mai 2004 ii Abstract In today’s world, many statistical questions require the use of computational assistance. Our approach, presented in this thesis, combines the possibilities of the powerful statistical software environment XploRe, with the advantages of distributed client/server applications, and the opportunities offered by the Internet. In order to offer the client access to a large community, the Java language is used to implement the client’s functionalities. The result is a statistical package - usable via the World Wide Web - that can be used like a traditional statistical software package, but without the need for installing the entire software package on the user’s computer. This thesis provides an overview of the desired software environment, and illustrates the general structure with the implementation of the XploRe Quantlet Client/Server architecture. It also shows applications, in which this architecture has already been integrated. Keywords: Client/Server Architecture, XploRe, Java, Statistical Computing, Electronic Books, Interactive Teaching iii iv Zusammenfassung Viele statistische Problemstellungen erfordern in der heutigen Zeit den Einsatz von Computern. Der von uns in dieser Dissertation vorgestell- te Ansatz kombiniert die F¨ahigkeiten der statistischen Softwareumgebung XploRe, mit den Vorteilen einer verteilten Client/Server Anwendung und den M¨oglichkeiten, die sich durch das Internet er¨offnen. Um den Client ei- ner großen Gruppe von Anwendern zug¨anglich zu machen, wurde Java zu seiner Realisierung verwendet. Das Ergebnis ist ein Statistikpaket, nutzbar via World Wide Web, das wie ein herk¨ommliches statistisches Softwarepaket verwendet werden kann, ohne die Notwendigkeit, das gesamte Softwarepaket zu installieren. Die vorliegende Arbeit gibt einen Uberblick¨ uber¨ die notwendige Softwa- reumgebung und erl¨autert die generelle Struktur der XploRe Quantlet Client/Server Architektur. Die Arbeit zeigt außerdem Anwendungen, in die diese Architektur bereits integriert wurde. Schlagw¨orter: Client/Server Architektur, XploRe, Java, Statistisches Rechnen, Elektroni- sche Bucher,¨ Interaktives Lehren v vi Acknowledgments Before actually starting to work on the XploRe Quantlet Client/Server project, and this thesis itself, acknowledgments in papers often seemed some- how strange to me. Now that I went through the entire process myself, I have revised my attitude. It takes much more than just a couple of well-known colleagues to achieve one goal. First of all I would like to thank my family - my wife Manja and my son Timo - for their patience with me and for supporting this project over the last years. I would also like to express my gratitude to my adviser Prof. Dr. Wolf- gang H¨ardle,who always supported the development of this project with his thoughtful advise and fruitful discussions. In the same respect, I would like to extend my appreciation to Prof. Oliver G¨unther, Ph.D., for his review and comments during the development of this thesis. For technical support, I would like to thank the members of the XploRe team - Dr. Sigbert Klinke for his continuous help and development of the XploRe Quantlet Server, Dr. Torsten Kleinow and J¨org Feuerhake for the immense effort they put into the client/server project, and last but not least Dr. Zdenek Hlavka, for his extensive testing and evaluation of the XploRe Quantlet Client. I would likewise reserve my gratitude to Jennifer A. Trimble, Paul T. Harvey and David C. Trimble, Ph.D. for their valuable help in completing this thesis. Berlin, April 2004 Heiko Lehmann vii viii Contents 1 Introduction 1 1.1 Motivation ............................. 1 1.2 Structure of this Thesis ...................... 4 2 Client/Server Computing 7 2.1 Client/Server Computing - A Closer Look ........... 8 2.1.1 Client ........................... 8 2.1.2 Server ........................... 9 2.1.3 Middleware ........................ 9 2.1.4 N-Tiered Models ..................... 10 2.1.5 Fat Clients versus Thin Clients ............. 11 2.2 From Client/Server to Distributed Computing ......... 13 2.3 Web Services ........................... 16 2.4 Statistical Computing vs. Web Services ............. 18 3 XploRe Quantlet Client/Server Model 21 3.1 XploRe Quantlet Server ..................... 23 3.2 Middleware MD*Serv ....................... 24 3.3 MD*Crypt Package ........................ 26 3.3.1 Structure ......................... 27 ix CONTENTS 3.3.2 Client Communication Process .............. 28 3.3.3 Programming a Simple Client .............. 38 3.4 XploRe Quantlet Client ..................... 40 4 XQC in Detail 43 4.1 XQC in Action .......................... 43 4.1.1 Application versus Applet ................ 43 4.1.2 Configuration ....................... 45 4.1.3 Getting Connected .................... 46 4.1.4 Desktop .......................... 47 4.1.5 XploRe Quantlet Editor ................. 50 4.1.6 Data Editor ........................ 52 4.1.7 Method Tree ....................... 58 4.1.8 Graphical Output ..................... 62 4.1.9 Special Settings ...................... 65 4.1.10 Getting Help ....................... 67 4.2 Programming Structure of the XQC ............... 68 4.2.1 XClient - The Starting Point ............... 69 4.2.2 User Interfaces ...................... 71 4.2.3 Character User Interface - CUI ............. 72 4.2.4 Graphical User Interface - GUI ............. 74 5 XQC/XQS Compared to Other Web Based Statistical Solu- tions 89 5.1 CGI Techniques .......................... 89 5.2 “Standalone” Java Applets .................... 90 5.3 Java Based Client/Server Computing .............. 91 x CONTENTS 6 Reproducible Research Using the XQC/XQS Technology 93 6.1 Types of Presentation ...................... 95 6.1.1 Text Only ......................... 96 6.1.2 Graphical Representation ................ 96 6.1.3 Reproducibility of Calculated Results and Graphics .. 98 6.1.4 Reproducibility and Interactivity Regarding Data ... 99 6.1.5 Reproducibility and Interactivity Regarding Data and Statistical Programs ................... 99 6.2 Making Research Reproducible ................. 100 6.3 MD*Book ............................. 105 7 Interactive Teaching - MM*Stat 109 7.1 Introduction ............................ 110 7.2 Characteristics of MM*Stat ................... 111 7.3 Lecture Units ........................... 112 7.4 Additional Information ...................... 113 7.5 Examples ............................. 113 7.6 Reinforcing Previously Learned Statistical Content ...... 117 7.7 Additional Features of MM*Stat ................. 117 7.8 Technical Parameters of MM*Stat ................ 118 7.9 User Acceptance ......................... 119 7.10 Related Projects ......................... 120 8 Conclusions 121 A License Agreement 129 xi CONTENTS B XQC Source Code 131 B.1 XClient.java ............................ 131 B.2 XClientAction.java ........................ 140 B.3 XProperties.java ......................... 146 B.4 XApplet.java ........................... 150 B.5 XConsole.java ........................... 152 B.6 XEditorFrame.java ........................ 154 B.7 XOutputFrame.java ........................ 156 B.8 XDataMethodFrame.java ..................... 158 B.9 XDataMethodAction.java .................... 164 B.10 XDataTableModel.java ...................... 173 B.11 XDataMethodFrameTree.java .................. 174 B.12 XDisplayFrame.java ........................ 177 B.13 XDisplay.java ........................... 179 B.14 XPlot.java ............................. 182 B.15 XPlotAction.java ......................... 194 B.16 XSetGOpt.java .......................... 197 B.17 XReadValue.java ......................... 198 B.18 XSelectItem.java ......................... 200 C Example of a Third Party Client 203 C.1 ThirdPartyClient.java ....................... 203 xii List of Figures 2.1 Simple client/server architecture ................. 8 2.2 Fat Client versus Fat Server ................... 12 2.3 Communication process using ORPC .............. 14 3.1 XploRe Quantlet client/server architecture .......... 22 3.2 MD*Serv structure ........................ 25 3.3 MD*Crypt structure ....................... 27 3.4 XQC in action .......................... 41 4.1 XQC - jar file ........................... 44 4.2 XQC started as an applet .................... 44 4.3 XQC - embedded in HTML ................... 45 4.4 Manual input for server and port number ........... 47 4.5 XQC connected and ready to work ............... 48 4.6 Console .............................. 48 4.7 Output Window ......................... 49 4.8 Menu ’XQC’ ........................... 50 4.9 Menu ’Program’ ......................... 50 4.10 XploRe Editor Window ..................... 51 4.11 Menu ’Data’ ........................... 52 xiii LIST OF FIGURES 4.12 Dimension of the Data Set ................... 53 4.13 Combined Method and Data Window ............. 54 4.14 Working with the Method and Data Window