hierarchy software development framework (h- dp-fwk ) project

21
Hierarchy Software Development Framework (h-dp-fwk) Project Alexander Zaytsev // [email protected] Budker Institute of Nuclear Physics (BINP) Novosibirsk, Russia CHEP2009 (Prague)

Upload: lilika

Post on 18-Feb-2016

22 views

Category:

Documents


0 download

DESCRIPTION

Hierarchy Software Development Framework (h- dp-fwk ) Project. Alexander Zaytsev // [email protected] Budker Institute of Nuclear Physics (BINP) Novosibirsk, Russia. CHEP2009 (Prague). Outline. Introduction Project architecture Key design assumptions - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Hierarchy Software Development Framework (h- dp-fwk ) Project

Hierarchy Software DevelopmentFramework (h-dp-fwk) ProjectAlexander Zaytsev // [email protected]

Budker Institute of Nuclear Physics (BINP)Novosibirsk, Russia

CHEP2009 (Prague)

Page 2: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 2

Outline

• Introduction• Project architecture• Key design assumptions• Review of the main features• Some details on implementation• Summary and future plans

3/24/2009

Page 3: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 3

Introduction to the Project• Hierarchy Software Development Framework (h-dp-fwk) is a

lightweight tool for building portable modular applications for performing data analysis in a batch mode.

• Initially the project was targeting the case of building experimental data processing applications for CMD-3 experiment (BINP) and then it was redesigned from the scratch in order to match the generic case of modulardata processing application operating within the well defined computing environment.

• The licensing schema for the source code, binaries and documentation implies that the product is free for non commercial use.‐

• Official website: http://hdpfwk.org

3/24/2009

Page 4: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 4

Key Design Assumptions

3/24/2009

• The target application should be easily decomposable into a set of modules while the rate of switching control from one module to another is within the sequence is relatively low thus the performance overhead introduced my the Framework itself is negligible (HEP offline event processing is the ideal case of such conditions)

• Direct interactions between modules and non-Frame-work based session control/modules configuration are avoided whenever it is possible

• The application runs in a batch environment thus no interactive features needed (CLI tools only)

Page 5: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 5

Pros & Cons of Relying onh-dp-fwk Framework

• What developers and users gain (pros):– Well formed logging,

debugging and runtime consistency verification tools

– XML configurationhandling tools with internal consistency verification blocking parsing mecha-nisms when needed

– Data processing session control interfaces (CLI/API)

• What they ought to accept (cons):– Studying new interfaces and

tools– Getting used to the

CLI/API,XML configura-tion and data processing schema proposed (basic knowledge of XML,XML Schema & XInclude concepts is required)

– Design the applications with respect to the Framework' architecture

3/24/2009

Page 6: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 6

Pros & Cons of Relying onh-dp-fwk Framework

• (pros):– Message and data exchange

tools– Dependency resolution

mechanisms for both forward and reversed lookup

– No need to spend resour-ces on building your own runtime environment, so you can concentrate on the nontrivial parts of the code which matters most

• (cons):– Getting used to modules

interaction schema in the reverse dependency lookup mode (DAG)

– The application must be large enough and significantly long living in order to benefit from using the mechanisms provided by the Framework

– Low performance overheads for applications with intensive message exchange is not guaranteed

3/24/2009

Page 7: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 7

Main Features

The main features of the Framework are:• Modularity,• Built in message and data exchange mechanisms,‐• XInclude and Schema enabled XML configuration management tools,• Dedicated log management tools, internal debugging tools,• Both dynamic and static module chains support,• Internal DSO version and consistency checking,• SCons base build and packaging system for handling both core ‐

components and modules,• Well defined API for creating specialized sub-frameworks.

3/24/2009

The challenge is to build the system which is suitable forboth development and production environment.

Page 8: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 8

Project Architecture Layout

3/24/2009

Page 9: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 9

External Dependencies

3/24/2009

Page 10: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 10

Message Management Tools• Centralized logger of the Framework is implemented on top of the

log4cxx toolbox which is capable of handling named logger hierar-chies and provide a variety of message I/O and filtering tools

• Use of high level macro wrappers allows one to remove all the logger related code or just a part of it via build system interface without changing the code

• Logging and debugging tools are the most fundamental part of the Framework:– Almost all the project components depend on– The message handling schema implemented is intended to be used not only

by the base Framework itself, but by user modules and derived Frameworks as well

– Internal control message mechanism involved is base entirely on exceptions

3/24/2009

Page 11: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 11

Logger Architecture Overview

3/24/2009

Page 12: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 12

Build System• Build system exploited by the project is based on

SCons product which an open source Python based multi-platform build system and high level wrappersplaced on top of it

• It is aware of high level logger tuning options and capable of producing the binaries with requested level of verbosity selected

• In addition it supports source code tree management tools (cleaning, spellchecking, Doxygen documentation production), batch RPM/tarball builds and provides a simple implementation of the build server functionality

3/24/2009

Page 13: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 13

Build System Architecture Summary

3/24/2009

Page 14: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 14

Variety of Builds Supported

3/24/2009

Page 15: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 15

Build Servers Support

3/24/2009

Page 16: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 16

Data Processing Session

• Data processing schema is defined by the selected approach to inter-modules interaction while wide spectra of solutions are supported:– Hard-coded sequence (direct module chain resolution,

sequence is defined by XML configuration)– DAG sequence resolution (reverse module chain resolution,

sequence can be defined by both module'scode and XML configuration)

– Supervisor modules control (arbitrary module chain resolution defined mostly by the supervisor module's code)

– Mixture of solutions listed above

3/24/2009

Page 17: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 17

XML Configuration Handling• libxml2 is used as

a low level handlerof configuration files

• High level wrappersprovide XInclude/XML Schema support anda user tunable XML configuration sub-sections override mechanism

• Combined these two features deliver asignificant increase of usability when it comesto dealing with the large configuration (e.g. global reconstruction)

ModuleModuleModuleModule

h-dp-fwk CLI Tools(DSO based modules support)

XML sub.2

XML Sub.1

XML config

XML Schem

a

RelaxNG

Schema

XInclude Generate

Page 18: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 18

Data Access Mechanism

• The Framework provides the following tools for data access management exposed to the end users and module developers:– multilayer cache for automatic optimization of the

modules call sequence in the reverse dependencylookup mode• It particular the cache can tuned to take into account the

periodic structures within the input data (e.g., runs)– So called “proxy dictionary” mechanism associating

a particular data instance in memory with a human readable name

3/24/2009

Page 19: Hierarchy Software Development Framework (h- dp-fwk ) Project

Module

Module

Data

SOFTWARE INTEGRATION PLATFORM

19

Development (DSO based) environmentCmd3Fwk Software Integration Framework

Module

Module

Module

External datasource

Data

Data

Data

read

exports

Data

Data

marked asthe final module in the sequence

Reverse dependency lookup in the DAG implicitly specified in XML configurationExtern

al XML config

depends on

module parameters,dependency specs,external data I/O config

The same DAG based dependency resolution approach works fine for CMD-3 simulation (Geant4).

The 3rd level trigger will require predefined module sequence.

Data exchangeinterface provided

with cache functionality

Module

Data

Module

Page 20: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 20

Plans for the Next Releases• The following items which are on the project TODO list

were shifted to the next releases since they are not critical for testing the product in the development environment:– Fully functional support of static builds with predefined

set of modules and/or XML configuration for the longterm use in production

– GUI tool for editing XML configuration with RelaxNG/XML Schema and interactive dependency tree visualization support

– Standalone interactive tool for reviewing and filtering logger messages

– Python API

3/24/2009

Page 21: Hierarchy Software Development Framework (h- dp-fwk ) Project

H-DP-FWK Project @ CHEP2009 21

Summary• The project is now approaching the 1st publicly available production release v1.0

which will be provided with extensive set of technical documentation and the set of application building examples

• The functionality implemented in the h-dp-fwk up to now is enough to build a software integration solution for the offline data processing of a small or moderate scale HEP detector experiment

• Release v1.0 is planned to be thoroughly tested and validated within the framework of CMD-3 detector collaboration(BINP, Novosibirsk)

• An updated TODO list for the next release v1.1 should be commissioned shortly afterwards

• In addition the possibility of developing the sub-frameworks forthe target fields outside the scope of HEP data processing willbe investigated later this year

• For more details please refer to the documentation sectionof the official website: http://hdpfwk.org/?docs

3/24/2009