FAYE: A Java Implement of the Frame/Stream/Stop Analysis Model.

Similar documents
IceCube s Development Environment.

UNIT-IV BASIC BEHAVIORAL MODELING-I

In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured

These Are the Top Languages for Enterprise Application Development

A Generic Multi-node State Monitoring Subsystem

Chromeleon-PA Analyzer User s Guide Dionex Corporation

JAIDA, JAS3, WIRED4 and the AIDA tag library experience and new developments

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

2. The system of... generally ran one job at a time. These were called single stream batch processing.

(Refer Slide Time: 00:02:00)

Part III. Issues in Search Computing

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

The BABAR Database: Challenges, Trends and Projections

UNIT 5 - UML STATE DIAGRAMS AND MODELING

Process size is independent of the main memory present in the system.

CSCI 204 Introduction to Computer Science II Lab 8 Priority Queue ADT

Engineering program development. Edited by Péter Vass

1.1 Jadex - Engineering Goal-Oriented Agents

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger

(Refer Slide Time: 00:02:02)

Motivation was to facilitate development of systems software, especially OS development.

Order Is A Lie. Are you sure you know how your code runs?

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Lifecycle-Aware Components Live Data ViewModel Room Library

Interactions A link message

Chapter 12. File Management

Optimate CFD Evaluation Optimate Glider Optimization Case

Scheduling Algorithm and Analysis

Appendix D: Mapping BPMN to BPD Profile

Multi-threaded programming in Java

15 FUNCTIONS IN C 15.1 INTRODUCTION

Multiprocessor scheduling

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

Module 1. Introduction:

Motivation was to facilitate development of systems software, especially OS development.

Input Output (IO) Management

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51

What s New in Spotfire DXP 1.1. Spotfire Product Management January 2007

Dependability tree 1

Twitter Adaptation Layer Submitted for Drexel University s CS544

Optimizing Parallel Access to the BaBar Database System Using CORBA Servers

An Introduction to Object Orientation

CIS233J Java Programming II. Threads

GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III

Solved MCQs on Operating System Principles. Set-1

Introduction to Flash - Creating a Motion Tween

ADL 101: Week 2 Syllabus

RIS shading Series #2 Meet The Plugins

The Dynamic Typing Interlude

RSA Archer Advanced Workflow Overview & Troubleshooting

A DAQ system for CAMAC controller CC/NET using DAQ-Middleware

SPOS MODEL ANSWER MAY 2018

(Refer Slide Time: 01:25)

RAFT Tuner Design for Mobile Phones

Multiprocessor and Real- Time Scheduling. Chapter 10

Improved Applications with SAMB Derived 3 meter DTMs

Visual Representations: Geometry in Art. Common Core State Standards. Students will decompose polygons into triangles, rectangles, and trapezoids.

Process and Resource Management

PROCESSES Gursharan Singh Tatla 24/01/2011

CS 140. Calendar Assignment. Part 1

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Functions. 1. Press the picture on App to enter the live page (as the pictures show) ;

[MS-RDPEMC]: Remote Desktop Protocol: Multiparty Virtual Channel Extension

2. Volume II, paragraph 1.2.2: Replace the following first paragraph and Table 1-4: Table 1-4: Number of GWA/SCADA Upgraded Facilities

Performance Throughput Utilization of system resources

Operating System Support

Heuristic Evaluation of Enable Ireland

The Dynamic Model. An Introduction to UML. Enterprise Architect. by Geoffrey Sparks. All material (c) Geoffrey Sparks

Chapter 2: The Object-Oriented Design Process

COMPUTER SCIENCE LARGE PRACTICAL.

CMPSCI 377: Operating Systems Exam 1: Processes, Threads, CPU Scheduling and Synchronization. October 9, 2002

TIMES A Tool for Modelling and Implementation of Embedded Systems

SEAL Project Proposal

Simulation-Based Analysis of UML Statechart Diagrams: Methods and Case Studies 1

BASICS OF BPMN BASIC BPMN SUBSET OKAY, SO WHAT DO I REALLY NEED TO KNOW? CHAPTER 2

8-Bit Microcontroller with Flash. Application Note. Controlling FPGA Configuration with a Flash-Based Microcontroller

UML- a Brief Look UML and the Process

CAS 703 Software Design

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Single Pass Connected Components Analysis

Multitasking and scheduling

A PROPOSAL FOR MODELING THE CONTROL SYSTEM FOR THE SPANISH LIGHT SOURCE IN UML

Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to:

Bridgeware Systems War Board Documentation

1 OBJECT-ORIENTED ANALYSIS

Part (04) Introduction to Programming

7 The Integrated Debugger

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL

Bottom-Up Parsing. Lecture 11-12

Stateful Objects. can I withdraw 100 CHF? may vary over the course of the lifetime of the account.

Software Engineering Lab Manual

LibRCPS Manual. Robert Lemmen

The Program Specification:

Multiprocessor and Real-Time Scheduling. Chapter 10

Windows and Events. created originally by Brian Bailey

SEEM4570 System Design and Implementation Lecture 11 UML

Software Engineering. Page 1. Objectives. Object-Behavioural Modelling. Analysis = Process + Models. Case Study: Event Identification

And Even More and More C++ Fundamentals of Computer Science

Transcription:

FAYE: A Java Implement of the /Stream/Stop Analysis Model. S. Patton LBNL, Berkeley, CA 94720, USA FAYE, The AnalYsis Executable, is a Java based implementation of the /Stream/Stop model for analyzing data. Unlike traditional based analysis models, the /Stream/Stop model has no preference as to which part of any data is to be analyzed, and an get as equal treatment as a change in the high voltage. This model means that FAYE is a suitable analysis framework for many different type of data analysis, such as detector trends or as a visualization core. During the design of FAYE the emphasis has been on clearly delineating each of the executable s responsibilities and on keeping their implementations as completely independent as possible. This leads to the large part of FAYE being a generic core which is experiment independent, and smaller section that customizes this core to an experiments own data structures. This customization can even be done in C++, using JNI, while the executable s control remains in Java. This paper reviews the /Stream/Stop model and then looks at how FAYE has approached its implementation, with an emphasis on which responsibilities are handled by the generic core, and which parts an experiment must provide as part of the customization portion of the executable. 1. Introduction The /Stream/Stop model developed for CLEO III analysis was originally developed in C++ [1]. Since then is has been successfully deployed in a number of rolls at CLEO. Meanwhile the IceCube experiment, which has adopted Java as its main language for DAQ and Data Handling, wanted to use the /Stream/Stop model in its code. This meant that a Java version of the model needed to be developed. 2. The /Stream/Stop Model Before examining the Java implementation of the /Stream/Stop model it is worthwhile reviewing the model itself. The core idea of the model is that any analysis of data taken from a H.E.P. experiment is essentially based upon an electronic picture of the experiment at certain moments in time. This picture is made up of various different elements which change over time and, most importantly, change at different rates, e.g. a detector s geometry should change much less frequently than its high voltage () status. Given these ideas the following components are defined in the /Stream/Stop model. Record This is a set of related data, all of which all will conceptually change at the same time. The electronic picture of the experiment that is composed of different types of Records, all of whom are related to the same time. Stream A set of Record, all of the same type, from different times. Stop The occurrence of a new Record in a Stream of interest. When this occurs during execution the corresponding to the Stop is passed to analysis routines for processing. A Stop which occurs on a sequential Stream (the Stream does not have to be ordered). Passive Stop A Stop which occurs in response to, and precedes, an. i.e. if the Record in some Stream of interest changes when an Active Stop occurs, the The corresponding to this Stream of interest is passed for processing before the corresponding to the Active Stop is supplied. Figure 1 shows off the ideas of a Record, a Stream and a set of s. In this Figure the three horizontal bands, from top to bottom, in each diagram represent the, and Streams. The solid blocks of color in these Stream represent an appropriate Record in that Stream, with the label indicating the time associated with that Record. The tall black open rectangle represents a which contained either the Records corresponding to the time of the, the most recent Record in a Stream which has no Record matching the time of the (as seen for the Stream in Figure 1(b)), or no Record for a Stream that has no record prior to the time of the (as seen for the Stream in Figure 1(b)). Figure 2 helps demonstrate the difference between Active and Passive Stops using the example of an Display. In this case the and Streams are the Streams of interest for this executable. The executable is driven by a sequence of Records each of which generate an. The Stream Records, on the other hand, are not provided sequentially but rather are read from a database to fill in the s needed for the Active Stops. As can be seen in the Figure, before the first can be supplied, a Passive Stop cause by the reading of the initial Record should be supplied to the analyses so that they can process this initial geometry before processing the first. 1

y (a) Detector exists, is off. (b) turned on. (c) First read out. (d) n th read out Figure 1: The ideas of a Record, a Stream and a set of s. (a) Active Stops (b) Preceding Passive Stop Passive Stop Figure 2: An illustration of the difference between Active and Passive Stops. 3. Implemention of the /Stream/Stop model The Java implementation of the /Stream/Stop model is broken down into three separate layers. The first and most general layer is a generic record processing loop. This part of the implementation is based on the classic source/listener pattern that is used throughout the standard Java libraries. In fact, this layer is so general that it is scheduled to become part of the freehep Java library [2] The next layer implements the major ideas of the /Stream/Stop model and, as such, contains the logic needed to supply s to analyses. However as the exact definitions of Records and Streams are experiment dependent these detail are included in the third layer, rather than the second. The third layer is the only layer that an experiment needs to provide to tailor FAYE to work with their experiment. This layer includes the definition of Records and Streams and also includes the mechanism to dispatch s to the correct analysis routines. 3.1. The freehep Layer The generic record loop code is contained in the org.freehep.record packages. The core interface in these part of the code is the RecordListener interface. 3.1.1. The RecordListener interface The RecordListener interface defines the methods that any analysis class must implement in order to be executed as part of a record loop. Figure 3 shows the life-cycle that all implementations of the RecordListener interface are expected to follow. When a RecordListener instance is created it starts off in a dormant state. When a record loop is about to begin, the instance will receive a configure message and transition into the configured state. This transition gives the instance an opportunity to read 2

Dormant configure finish suspend Configured recordsupplied reconfigure resume suspend Suspended recordsupplied Processing Active Figure 3: The life-cycle of the RecordListener interface. and respond to any input parameters that may have been set, and thus prepare itself for recordsupplied messages. In the course or normal processing a RecordListener interface can expect to receive one or more recordsupplied messages after it has been configured. The first of these messages will cause the instance to transition into the processing state, where it will remain while it receives more recordsupplied events. ually there will be no more records to supply, either because a user defined limit has been reached or no more Records are available. When this happens the instance will receive a suspend message which will cause it to transition into the suspended state. This transition allows the instance to release and timecritical resources, e.g. database locks, so that other jobs can continue while this job is not processing records. There are three possible transitions out of the suspended state, two of these transitions return the instance to a configured state, while one returns it to the dormant state. The difference between the reconfigured and resume messages, both of which cause a transition into the configured state, is that the first of these implies that the input parameters to the instance of RecordListener may have changed and that the instance should be read and respond to these new values, while the other message guarantees that none of these parameters have changed and so the instance can resume where it left off. The other transition out of the suspended state is caused by a finish message being received. This signals that the instance is not longer in the set of classes that will be executed if or when another record loop is executed. This transition allows the instance to clean up any intermediate data it contains and, if necessary, output a summary of the processing it has done. The instance of a RecordListener can expect to only be destroyed from the dormant state. This gives the instance one last change to cleanly shut down. However, as this transition is cause by the finalize Java method it should normally not be used as there is no determinist way of knowing when or if this method will be called. The state machine shown in Figure 3 leads to the RecordListener interface as declared in Figure 4. 3

public interface RecordListener extends Listener { public void configure(configuration event); public void finish(record event); public void recordsupplied(recordsupplied event); public void reconfigure(configuration event); public void resume(record event); public void suspend(record event); } Figure 4: The RecordListener interface. 3.1.2. The other classes and interfaces The other classes and interfaces in the org.freehep.record packages provide tools that can be used in conjunction with RecordListener interface. The following list details some of the issues these tools tackle: Sequencing This allows a set of RecordListeners to be executed sequentially. Branching This enables two sequences of RecordListeners to be executed independently of each other. Conditional execution This allows for preemptive termination of a sequence of RecordListeners when it has been decided that continued execution would be a waste of time. Source interfaces This defined the interfaces which should be implemented for sequential and interactive processing of the record loop. it wants to access data in the. The created is returned for use in the generic loop. The FayeStopSource objects contained in the FayeSource are not only responsible for reading Record data from their own sources, but they are also required to supply to the FayeSource object the next they can read and, given an Active Stop, the earliest Passive Stop they can read. The FayeStopSource can also act as a RecordListener so that it can can be managed by the RecordListener s life-cycle and, more importantly, its recordsupplied implementation can be used to load the with the appropriate data from its source. The single RecordListener implementation provided by this layer is the FayeListener class. This acts as a two phase listener. During the first phase, remembering that the new has already been created, all the FayeStopSource objects get an opportunity to add their data to the. The second phase then supplies this filled to the analysis RecordListener implementations. 3.2. The FAYE Layer The FAYE layer implements the mechanics needed to run the /Stream/Stop model on to of the generic record loop. Its responsibilities lie mainly in the area of the creation of s, which serve as the records in this set-up. This should not be confused with the idea of Records that are elements of the itself. This layer provides a FayeSource class which is an implementation of the record source interface that is declared in the freehep layer. This implementation contains a set of FayeStopSource objects, each of which is able to read Record data from a single source, e.g. a file, database, etc., and provide it to the FayeSource instance so that it can work out which is the next Stop that should be used to create the next supplied to the analysis. The itself is created using the Factory interface of declared in this layer. By using a factory interface and leaving the exact implementation to be contained in the Experiment s layer, an experiment is free to choose how 3.3. The Experiment (IceCube) Layer The Experiment s layer allows an experiment to specialize this framework to it own situation. In this paper we will use the IceCube experiment as the example experiment. The main aim of the specialization is to enable the inclusion of the experiments own Streams into the frameworks and handle the dispatch of the s to the correct methods. Figure 5 shows the standard way of implementing this. The IceCubeListener class defines methods for each of the standard Streams in the experiment. The IceCubePlugin class bring together the generic RecordListener interface and experiment specific one and handles the dispatch of the s to the right method by using an instance of the IceCubeSupport class. This class, in turn, implements its recordsupplied method as a large switch statement that matches the Stream which caused the to be supplied to the matching method in the IceCubeListener interface. 4

RecordListener IceCubeListener geometry(icecube frame); hv(icecube frame); event(icecube frame); IceCubeSupport recordsupplied(recordsupplied event); IceCubePlugin recordsupplied(recordsupplied event); support.recordsupplied(event); frame = factory.lookup(event.getrecord()); Stream stream = frame.getstopstream(); if (stream.equals(icecubestream.geometry)) { listener.geometry(frame); } else if (stream.equals(icecubestream.)) { listener.hv(frame); } else if (stream.equals(icecubestream.event)) { listener.event(frame); } Figure 5: The organization of classes in the Experiment s layer. 4. Summary The /Stream/Stop model provides a flexible framework in which to develop H.E.P. analyses. This has been demonstrated by its C++ implementation at CLEO. The Java implementation of this model is based on a freehep foundation, which means that it can easily be used elsewhere, for example as part of JAS3 [3]. An experiment only needs to specialize around half a dozen classes to tailor this framework to it own situation. References [1] CHEP 97 Berlin, Design and Implementation of the CLEO III Data Analysis Model, C.D.Jones, et al., Parallel talk A380 [2] http://java.freehep.org [3] http://jas.freehep.org 5