180 likes | 340 Views
Java Analysis Studio. Tony Johnson tony_johnson@slac.stanford.edu Stanford Linear Accelerator Center CHEP 97 - April 1997. Contents. Java Analysis Studio - Goals Intro to Java Why Java for Distributed Physics Analysis? Implementation Why Java - Reprise Demo
E N D
Java Analysis Studio Tony Johnson tony_johnson@slac.stanford.edu Stanford Linear Accelerator Center CHEP 97 - April 1997
Contents • Java Analysis Studio - Goals • Intro to Java • Why Java for Distributed Physics Analysis? • Implementation • Why Java - Reprise • Demo • Current Status + Plans + Call for Input
Project based Data, histograms, fits, programs all stored in project. Can close project and return to exact same place tomorrow Experiment/Data format independent Distributed data analysis Integrated with other applications Analysis code written in Java Java excellent language for RAD == physics analysis Build on SLD experience with IDA Provide a rich set of OO analysis tools Histograms, plots, fits etc. Portable compiled on desktop executed on dataserver Supports Remote debugging Efficient (JIT) Widespread industry support Java Analysis Studio - Goals
Java Source code Compiler Java “Bytecodes” Mac Unix PC JIT Compiler Bytecode Interpreter Machine Code What is Java? • History • Originally designed (1991) as a small language for consumer electronics (cable boxes, toasters etc.) • Eventually someone wrote HotJava Browser, which could run Java Applets • Adopted by Netscape, Microsoft, Sun etc. as Web Programming Language. • More than just a Web Tool • Java is a fully functional, platform independent, programming language • Powerful set of machine independent libraries, including windowing library.
Totally Buzzword Compliant • Simple • well, simpler than C++ • Object Orientated • more so than C++ • Distributed • Built in support for Internet protocols, URL’s, HTTP, Remote Method Invocation, DB access etc. • Robust • “Impossible” to create memory leaks, go beyond the end of an array, corrupt stack or code • Secure • Bytecode “verifier”, padded cell • Architecture Neural, Portable • Runs on PC, MAC, Unix, VMS • Interpreted • “Compiler” converts code into machine independent “bytecodes” • High Performance • With JIT compiler still 2-3 times slower than native C++, but... • Multithreaded • Language has direct support for multithreading (cf. subprocesses) • Dynamic • Libraries canchange without recompiling programs that use them
JDK 1.1 adds: Object reflection Object serialization Remote Method Invocation CORBA support JDBC interface Standardized native interface 2d+3d API on the way Extensive built in library (including Math) Can read in unknown data and analyze it Can really store objects in databases (not just object data) Client Server applications straightforward Where’s the Meat?
Why Learn Java? • Stepping stone to C++ • Cleaner syntax • not backward compatible with C • More concerned with programmer efficiency than run-time efficiency • Far less gotchas • Especially memory management • Full object orientated language • Syntax very similar to C++ • Good language for writing medium sized portable applications, including GUI applications • Good candidate to replace KUIP/Comis/IDA/etc as physics analysis language • Web Applets • Hopefully useful ones • Database access • Data presentation
Users Java Code Java Compiler + Debugger Implementation- Model TCP/IP Network Data Analysis Engine GUI Padded Cell Experiment Extensions (Event Display) • Data • Zebra • Jazelle • Paw • Root • Objectivity Experiment Interface C++ Code
Original plan was to write C++/MFC/COM application for Windows Later converted to 100% pure Java Works everywhere Fast (enough) Rapid deployment of commercial tools IDE’s Extensions Components Use commercial “components” where ever possible Don’t want to write our own plotting package Olectra Chart C++ activeX control Jchart Java “Bean” Wrap in interface layer to make it possible to change later. Implementation - Details
Implementation - Local Objects Histogram Plot Analysis Studio Histogram Analysis Studio Plot Data request Data + Update Notifications
Implementation - Remote Objects Histogram Plot Remote Adaptors Deal with data batching, Caching, network exceptions Analysis Studio Histogram Analysis Studio Plot
Lessons Learned - 1 • Microsoft programmers drink too much Jolt Cola • Win32/MFC/COM/ActiveX system was not designed to be easy to learn • WHILE (<users having problems learning system>) <write more documentation> • Microsoft is changing/extending things faster than the speed of learning • Once things fall into place it is possible to exploit Microsoft environment to rapidly build applications
Lessons Learned - 2 • Commercial software components can be very cost effective • Commodity software has large market, therefore cheap • Commercial plot package with more options than HBOOK cost $249, with no run time license. • Can wrap commercial components with HEP component layer
Current Status + Plans • Web site • http://www-sldnt.slac.stanford.edu/JAS • Version 0.1 available for download end of April • client+server • masochists only! • Join discussion group • We want your input • Ideas, Opinions and/or Code!