Java Analysis Studio May 9 2001 Mark Dönszelmann (CERN) Tony Johnson (SLAC)

Slides:



Advertisements
Similar presentations
WEB AND WIRELESS AUTOMATION connecting people and processes InduSoft Web Solution Welcome.
Advertisements

Introduction Main technologies: core written in Java embedded Jython interpreter code managed using the Eclipse plugin framework client program uses Eclipse.
Java Analysis Studio CHEP 2000 February 2000 Tony Johnson
JAS – Distributed Data Analysis Grid Enabled Analysis Workshop Caltech - June 23-25, 2003.
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Victor Serbo, SLAC30 September 2004, Interlaken, Switzerland JASSimApp plugin for JAS3: Interactive Geant4 GUI Serbo, Victor (SLAC) - presenter Donszelmann,
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
WorkPad 4 Quick Start WorkPad 4 Quick Start  Business Optix brings the rigor and discipline of business modelling and design into.
TrendReader Standard 2 This generation of TrendReader Standard software utilizes the more familiar Windows format (“tree”) views of functions and file.
Java Analysis Studio & Object Oriented Data Analysis (in Java) KEK 25 th May 2000 Tony Johnson - SLAC
Java Analysis Studio Tony Johnson Stanford Linear Accelerator Center CHEP 97 - April 1997.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
JAS3 – Current Status and Prospects by Victor Serbo, SLAC.
Java Beans.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Yahoo! User Interface (YUI) Library Natly Mekdara.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introducing Axis2 Eran Chinthaka. Agenda  Introduction and Motivation  The “big picture”  Key Features of Axis2 High Performance XML Processing Model.
FreeHEP Java Library Mark Dönszelmann, SLAC CHEP, La Jolla, March 2003.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Java Analysis Studio Status Update 12 May 2000 Altas Software Week Tony Johnson
Advanced Analysis Environments What is the role of Java in physics analysis? Will programming languages at all be relevant? Can commercial products help.
An Introduction to Software Architecture
JAS3 + AIDA LC Simulations Workshop SLAC 19 th May 2003.
JAIDA, AIDA-JNI, JAS3 Status and Plans Mark Dönszelmann, Tony Johnson, Joseph Perl, Victor Serbo, Max Turri AIDA Workshop CERN July 2003.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Marcel Casado NCAR/RAP WEATHER WARNING TOOL NCAR.
JAS/Wired + Geant 4 Tony Johnson July Contents What is JAS? What is WIRED? –Future Directions JAS+AIDA+GAG+Wired + Geant 4= ? Making it easy to.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Writing Extension Modules (Plugins) for JAS 3 Mark Donszelmann Tony Johnson Victor Serbo Max Turri CHEP2004, 27 september-1 october 2004, Interlaken, Switzerland.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
Using JAS3 for LCD Analysis Tony Johnson 20 th May 2003.
JAS3 - A general purpose data analysis framework for HENP and beyond Tony Johnson, Victor Serbo, Max Turri, Mark Dönszelmann, Joseph Perl SLAC.
The FreeHEP Java Library ACAT 2000 Fermilab – October 2000 Mark Donszelmann, Julius Hrivnac – CERN Gary Bower, Tony Johnson, Joseph.
SiD Workshop October 2013, SLACDmitry Onoprienko SiD Workshop SLAC, October 2013 Dmitry Onoprienko SLAC, SCA FreeHEP based software status: Jas 3, WIRED,
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
Introduction to Java Beans CIS 421 Web-based Java Programming.
Java Analysis Studio Atlas Software Week February 2000 Tony Johnson
Java Analysis Studio - Status CHEP 98 - September 1998 Tony Johnson - SLAC Jonas Gifford + Kevin Garwood - University of Victoria.
Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl.
Java Analysis Studio and the hep.lcd class library Mike Ronan - LBNL Joanne Bogart, Gary Bower, Tony Johnson - SLAC Nick Sinev - Oregon Don Benton - U.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Interactive Data Analysis on the “Grid” Tech-X/SLAC/PPDG:CS-11 Balamurali Ananthan David Alexander
WIRED World-Wide Web Interactive Remote Event Display Mark Dönszelmann, IT/API, CERN CHEP 2000, 9 February 2000, Padova, Italy.
FreeHEP, JAS and WIRED Mark Dönszelmann, CERN/IT Charles Loomis, UC, Santa Cruz ATLAS Software Week, 30 November 2000.
WIRED for LCD Analysis Mark Dönszelmann Linear Collider Simulation Workshop May 19-22, 2003, SLAC.
JAS and JACO – Status Report Atlas Graphics Group August 2000 Tony Johnson.
Giulio Eulisse, Northeastern University CHEP’04, Interlaken, 27th Sep - 1st Oct, 2004 CHEP’04 IGUANA Interactive Graphics Project:
Features of JAS Plots Plots update in real time. Data for plots can be local or remote (use Java RMI to connect to JAS Data Server). Rich variety of styles.
LCD WIRED FutureLCD Workshop May Joseph Perl 1 Future Plans for the LCD WIRED Event Display Joseph Perl SLAC Computing Services
Presented By:. What is JavaHelp: Most software developers do not look forward to spending time documenting and explaining their product. JavaSoft has.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Online Data Monitoring Framework Based on Histogram Packaging in Network Distributed Data Acquisition Systems Tomoyuki Konno 1, Anatael Cabrera 2, Masaki.
Discussion with Blueprint RTAG August 2002 Tony Johnson SLAC.
Building Interactive Web Applications for HEP Using the Google Web Toolkit (GWT) Tony Johnson Scientific Computing Applications.
XP Creating Web Pages with Microsoft Office
Potential use of JAS/JAIDA etc. SAS J2EE Review
An Introduction to Software Architecture
Outline Chapter 2 (cont) OS Design OS structure
Java Analysis Studio - Status
WIRED 4 Event Display Linear Collider Simulation Workshop
Presentation transcript:

Java Analysis Studio May Mark Dönszelmann (CERN) Tony Johnson (SLAC)

Outline Introduction to JAS JAS for online Monitoring –Use on Babar –Use of Plotting “Widget” Current/Future plans –FreeHEP library –FreeHEP application framework –FreeHEP plot package Experience and Conclusions

Introduction to JAS Pure Java Analysis Environment –Data Format Independent –Modular/Extensible via Plugins/Data Interface Modules –Rich Easy to use GUI –Built in editor/compiler for writing analysis code –Local and Client-Server Operation –Originally targeted at offline analysis – but used extensively for online monitoring as well

JAS GUI Tree provides access to analysis objects: Histograms Plots Data Sets Analysis Routines In principle any object. Each item has popup menus and double click action. Built in HTML viewer with embeddable “objects” (buttons, plots, etc). Plot Widget, shows data in real time, optimized for fast refresh performance

JAS Plotter Pages can display histograms. User can control layout, add remove plots, etc. Plots are highly interactive, can be manipulated by the user by dragging on the axis, or bounding box. Labels (title, legend, axis labels) can be updated by clicking and typing. Rebin slider can be used to dynamically change # of bins.

JAS Editor/Compiler Built in code editor with syntax highlighting (based on open-source Jedit editor) Built-in Java compiler. Can dynamically load (and unload) analysis code.

Data Format Independent JAS uses a simple interface (DIM) to isolate it from any particular data format. There are many DIM implementations which make different data formats accessible to the JAS client. Flexible design works with many different types of data, from Ntuples, Database tables (via JDBC) to arbitrary trees of objects. JAS Client DIM

Remote Data Access Rather than transporting peta-bytes of data to the physicist –Transport the physics analysis code to the data –Transparently - so that it feels just like local data access –Just ship histogram contents back to the physicists desktop (on demand) Allows remote analysis with modest network bandwidth Allows user to “feel” as if using local machine even when accessing remote data.

Remote Data Access - Implementation Exploit: –Java Remote Method Invocation (RMI) –Java sand box (like applets but in reverse – protect server from clients) Custom security manager limits what code loaded from server can do on server Works quite well – but some RMI problems remain: –ClassLoader problem (see discussion later) –RMI not compatible with firewall (or VPN) at client For callbacks to work, server must be able to open socket connections back to arbitrary port on client. Could be worked around with custom transport implementation (e.g. multiplex over single client initiated socket connection), but custom protocols are unimplementable under JDK 1.3 due to bad design in java.net.ServerSocket class.

Extensible via Plugins Plugins can: –Define experiment specific utilities (event display, analysis utilities, specialized tables). –Define data interfaces to handle new types of data. –Define new plotting routines (e.g. to display special display). –Add menus, create control areas, consoles, and output pages. –Plugins will be more flexible in JAS 3.0 (see discussion of FreeHEP application framework, later).

Examples of Plugins Particle decay tree Particle tabulation

Examples of Plugins WIRED event display

Plugin Implementation Current Implementation –At startup JAS scans System extensions directory User extensions directory –All.jar files found are added to “classpath” for extension ClassLoader –Each jar file is inspected to see if it contains a /JAS-inf/plugins.txt file If so the classes specified in the file are instantiated. These classes typically register services provided by the plugin. –When running in client-server mode, plugin code can also be dynamically downloaded from the server. The JAS server includes a simple http server which can upload any class on the server’s CLASSPATH. So far we have not worried too much about security – we assume the client trusts the server or it would not have connected to it. Limitations in Current Implementation –Scanning extensions directory not compatible with JavaWebStart –Custom classloader causes undesirable (lack of) interaction with RMI Classes loaded from server by RMI cannot see classes loaded by extension classloader. –Will be addressed in FreeHEP studio (don’t know exactly how yet)

JAS ClassLoaders JAS Class Loader Job Class Loader Extension Class Loader System Class Loader Loads from system CLASPATH Loads from extensions directory Loads analysis code from “JAS CLASSPATH” (set through GUI). Allows unloading and reloading Only used for “remote” job. Code is loaded into sandbox on server. RMI Class Loader Client Server Built-in http server Built-in to RMI, loads code using http Serves classes from server CLASSPATH

Modular Design JASHist (Plot Bean) Fitting Framework FunctionsFitters Analysis Framework GUI Framework Plugin Histogram Accumulation 3-4 Vector Utilities Data Interface Histo/Plot Adaptor Network Adaptor Particle Properties Jet Finder PAWSQLstdHEP Further improvements in modularity coming in JAS 3.0

JAS for online Monitoring Two ways to use JAS for online: –Use the entire JAS application (e.g. Babar) Exploit client-server operation Extensibility via plugins, dynamic code loading. HTML viewer for presenting pages of plots. –Just use the plot widget (e.g. CLEO) Live updates Supports time/date axes for time histories

Babar Online Monitoring JAS Clients Babar Server (Java) JAS/RMI Histogram Accumulation (C++) Histogram Accumulation (C++) Histogram Accumulation (C++) CORBA Reference Histograms Translates between Babar Corba protocol and JAS RMI protocol. Also maps Babar “pull” model to JAS “push” model Reference histograms can be normalized and overlaid on live data.

Examples of Babar Use HTML Pages. Allows for textual explanation of plots, and embedded hyperlinks Embedded plots. Style specified by XML file, data from server

Control via JAS Although not currently used by Babar, JAS can also load: –“control” modules which can send messages to the server to control data taking. –“display” modules which can display arbitrary data (tables, status display etc).

Using the Plotting Widget Data Source 1D Histogram2D Histogram Scatter Plot XY Plot (future) Simple DataSource interface makes it easy to attach to any data source. Plot monitors data for changes (uses Observer/Observable pattern)

JAS Plot Demo

Plot Component Features 1+2-D histograms and scatter plots –Scatter Plot display optimized for many 1000’s of points –3D Lego and Surface plots when Java 3D available Overlaying of several histograms or scatter plots Interactive function fitting for 1-D plots Direct User Interaction by clicking and dragging Numeric or time axes, plus axes with named bins Many display styles that can be set interactively or programmatically Dynamic creation and display of slices and projections of 2-D data. Very efficient redrawing to support rapidly changing data (handles over 100 updates/second). Printing using both Java 1 and Java 2 printing models. High quality print output is available when using Java 2. Saving plots as GIF images or as XML. Support for encapsulated postscript and PDF will be available in JAS 3.0 (from FreeHEP library) Custom overlays which allow data to be displayed using user defined plot routines for specialized plots.

Pros and Cons for online use Pros –Plot widget is entirely modular –Easy to embed in other applications –Efficient updating – ideal for real-time plots –Flexible time axis -- great for time histories (see stock market demo) Cons –Histograms assume fixed bin widths, XYPlot not currently supported (will be fixed in JAS 3.0)

Stock Market (Time History) Demo

The FreeHEP Library Contributors: Mark Dönszelmann - CERN Julius Hrivnac - LAL Gary Bower, Tony Johnson, Joseph Perl - SLAC Charles Loomis – UC Santa Cruz

What is Freehep library Started as a convergence of WIRED Java Analysis Studio (JAS) –A common base library minimize unnecessary duplication of work maximize code reuse –Soon realized many others working on Java Now have contributions from –JAS, Wired, Atlas, Babar and US Linear Collider Detector (LCD) »6 main contributors, plus students, others… Others welcome to contribute (contact current authors) Today - a library of HEP-wide Java software –Some very HEP specific (c.f. CLHEP) –Some general purpose utilities –Experiment Independent

Goals Open source –All code and documentation in CVS, web browsable –All code licensed under LGPL to make it freely reusable –Preview area for partly-baked ideas Minimal interdependence between packages –Take what you like, leave what you don’t. –Use interfaces for input Emphasis is on Java –We include some C++ code In particular tools for helping Java and C++ to co-exist –We include some language independent tools: XML formats HepRep, AIDA, Yappi

Goals continued Platform Independence –Both for developers and users Don’t duplicate existing functionality –Xerces, javahelp, log4j –No need to build these! Meta Goal –Persuade other to reuse our components and extend or improve them as necessary, Rather than reinventing the wheel. Ultimate Goal: –Large library of reusable components which will reduce the time and effort needed to develop future HEP software

FreeHEP Components Non-HEP specific –Application Framework –JACO – Java access to C++ Objects – 2D Vector Graphics – generates.eps,.svg, … HEP specific –hep.physics package 3-vector, 4-vector’s and utilities Jet Finding, Event Shape routines Generator Framework, Diagnostic Event Generator –hep.io – STDHEP, Root –hep.aida – Java Aida interface + reference implementation –Yappi – XML Particle Property Database –HepRep – Event display See Joe Perl’s Talk –HEP3D – Some Java 3D utilities

JAS 3 Will use FreeHEP/plugin architecture Will introduce: –AIDA (Abstract Interfaces for Data Analysis) compliant analysis environment –Scripting AIDAGUI: –Toolkit for experimenting with ideas for JAS 3 Scripting AIDA

FreeHEP Application Framework Application MDI Application Studio Data Studio Provides Set properties via "application properties" file User preferences stored between sessions A services package which allows to run as: Local application trusted JNLP applications untrusted JNLP applications. Use of XML to define menus and toolbars Use of a command manager for dispatching commands to command targets. Command line parsing About dialog Print Preview capabilities Recent File menu(s) maintained between sessions Reporting of errors to the user. JDK compatibility testing. Dynamic Look and Feel switching and persistency between sessions Window size and position maintained between sessions Splash Screen Status bar with message area and progress meter - including support for canceling time consuming operations. Adds pages, control(s) and console(s) areas. dynamic switching of page managers to allow pages to be organized as tabbed panes, or as movable windows on a desktop. multiple toolbars Adds Extensible via plugins Maintainance of user “session” using XML. Adds Facilities for data access (DIMs) JASWIRED Your Application

Studio/Data Studio JAS currently supports “plugins” Studio will extend this concept so application becomes bare framework, with: –Data Access Plugin (c.f. JAS DIM’s) –Histogramming (AIDA) Plugin –Plotting Plugin –Editing Plugin –Compiler Plugin –Scripting Plugin –WIRED (Event Display) Plugin –Etc. etc. etc. Plugins can communicate either explicitly, or (better) though –“service interfaces” –“service registries”

Test/Demo Apps

AIDAGUI

Scripting JAS already supports “scripting” in Java –Including “batch” mode with no GUI Want something you can just type a line and see immediately what happens Languages under consideration LanguageJava LikeSpeedUser FriendlyAble to extend Java Classes BeanShell8Went home before it finished 9 (nice console, command completion) 4 DynamicJava10*60 seconds510 Jython460 seconds58 PNuts9 Java 3 seconds

FreeHEP plot package Next generation of JAS Plotting Widget. –More flexible Current Rebinnable1DHistogram, Rebinnable2DHistogram, ScatterPlot data sources will become special cases of more general purpose data source –Will support XYPlot, variable bin widths, higher dimensions –Generic mechanism for user interaction (eg dragging on axis) to be communicated to data source. –Will support tooltips/picking on individual data points. Algorithms will be separated from GUI components –Axis “logic” (e.g. label/tick placement) will be usable with 2D or 3D graphical components –More extensible All existing plot styles will use “plugin” architecture New plot styles will be easy to add –E.g Could be used for stock market “candle” plots –More understandable Get rid of “DataManager” class hierarchy which is too complex.

Experience and Conclusions Java has been an excellent choice –Relatively easy to learn –Concentrate on good OO design –Productive, Fun to use –Cross platform platform support excellent –Despite rumours to contrary, very fast as long as application is well designed. Modern PC gives very responsive GUI. Still takes several (many) iterations to get OO design (almost) right. In complex environment still need to use tools (e.g OptimizeIt) to find memory leaks, but way easier than C++. Code reuse can be a reality – help us build FreeHEP!