rcms for xdaq based small daq systems m. gulmini, m. gaetano, n. toniolo, s. ventura,

25
Luigi Zangrando, Cern, 05/03/2002 1 CMS RCMS for XDaq based small RCMS for XDaq based small DAQ Systems DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura, M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura, L. Zangrando L. Zangrando INFN – Laboratori Nazionali di Legnaro INFN – Laboratori Nazionali di Legnaro

Upload: nimrod

Post on 04-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura, L. Zangrando INFN – Laboratori Nazionali di Legnaro. UI. Internet Intranet. RCMS. UI. UI. RCMS: definition. The R un C ontrol M onitor S ystem is defined as the software required to: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20021

CMS

RCMS for XDaq based small RCMS for XDaq based small DAQ SystemsDAQ Systems

M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura, M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura, L. ZangrandoL. Zangrando

INFN – Laboratori Nazionali di LegnaroINFN – Laboratori Nazionali di Legnaro

Page 2: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20022

CMS

RCMS: definitionRCMS: definition

The The RRun un CControl ontrol MMonitor onitor SSystem is defined as the software required to:ystem is defined as the software required to:• configure and set the CMS apparatus ( partitions or whole system)configure and set the CMS apparatus ( partitions or whole system)

• control and synchronize operation of the separate components control and synchronize operation of the separate components

• monitor the separate componentsmonitor the separate components

• handle errors and information messageshandle errors and information messages

• log continuously the current state of the experimentlog continuously the current state of the experiment

• provide a user interface for both control and monitorprovide a user interface for both control and monitor

RCMSInternetIntranet

InternetIntranet

UI

UI

UI

The RCMS architecture enables the users to access and control the experiment from any part of the world

Page 3: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20023

CMS

RCMS contextRCMS context

Session Manager

UIUIUI

Services Connection

ServicesServicesServices

EVBCtrl

CSCtrl

TRGCtrl

DCSCtrl

EVFCtrl

RUsEVMBUs

CS Sub - System

GlblMuCal

DCS Sub - System

EVB Sub-System TRG Sub-System EVF Sub-System

RCMS

Page 4: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20024

CMS

RCMS: block diagram RCMS: block diagram

Services C

on

nectio

nS

ervices Co

nn

ection

Session Session ManagerManager

Sub-System Sub-System ControllersControllers

RCMSRCMS

GUIGUI

resourcesresources

Sub-System Sub-System ControllersControllers

resourcesresourcesresourcesresources

Security Security serviceservice

Resource Resource serviceservice

Info & Mon Info & Mon s.s.

Job ControlJob Control

Problem Problem SolverSolver

servicesservices

dbdb

dbdb

dbdb

Page 5: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20025

CMS

RCMS statusRCMS status

Services C

on

nectio

nS

ervices Co

nn

ection

GUIGUI

resourcesresources

Session Session ManagerManager

Sub-SystemSub-System ControllersControllers

RCMSRCMSSecurity Security serviceservice

Resource Resource serviceservice

Info & Mon Info & Mon s.s.

Job ControlJob Control

servicesservices

Problem Problem SolverSolver

dbdb

dbdb

dbdb

Page 6: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20026

CMS

Tools: APACHE TOMCATTools: APACHE TOMCAT

ServicesServices

Session Session ManagerManager

Sub-System Sub-System ControllersControllers

Servlet containerServlet container APACHE APACHE TOMCATTOMCAT

HTML clientHTML client

C++ clientC++ client

Java clientJava client

Page 7: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20027

CMS

Tools: XML as communication protocolTools: XML as communication protocol

ServicesServices

Session Session ManagerManager

Sub-System Sub-System ControllersControllers

Servlet containerServlet container APACHE APACHE TOMCATTOMCAT

XML / HTTPXML / HTTP

XML / HTTPXML / HTTP

XML / HTTPXML / HTTPHTML clientHTML client

C++ clientC++ client

Java clientJava client

XML / HTTPXML / HTTP

XML / HTTPXML / HTTP

Page 8: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20028

CMS

Scalability: multiple containers allocated in different server machinesScalability: multiple containers allocated in different server machines

Internet - IntranetInternet - Intranet

Session ManagerSession Manager

Sub-System Sub-System ControllersControllers

Session ManagerSession Manager

Sub-System Sub-System ControllersControllers

ServicesServicesSub-System Sub-System

ControllersControllersSub-System Sub-System

ControllersControllers

Servlet containerServlet container

Page 9: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/20029

CMS

Tools: XML DatabaseTools: XML Database

XML databases represent a new technology that surpass the traditional data storage mechanism in convenience, ease of development.

The benefit of a XML DB solution is that:1. we don't have to worry about mapping our XML to some other data structure. We just

insert the data as XML and retrieve it as XML.2. we gain a lot of flexibility through the semi-structured nature of XML. This is

especially valuable when we have very complex XML structures that would be difficult or impossible to map to a more structured database.

Disadvantage: the performances are not good

Characteristics:– XML data is either stored in the internal native XML-DB or an external RDBMS– The server is accessible through easy to use HTTP and XML-RPC interfaces and

supports the XML:DB API for Java programming. – the search engine supports XPath queries.

Links: http://www.xmldb.org – http://exist.sourceforge.net – http://www.ozone-db.org - http://xml.apache.org/xindice/

Page 10: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200210

CMS

resourcesresources

Sub-System Sub-System ControllersControllers

Session Session ManagerManager

servicesservices

Sub-System Sub-System ControllerController

resourcesresources

RCMS: logical viewRCMS: logical view

run

ses

sio

nru

n s

essi

on

GUIGUIGUIGUIDef. run session: Def. run session: hardware and software hardware and software needed to operate a needed to operate a physic or test run with the physic or test run with the whole or a partition of whole or a partition of CMS apparatusCMS apparatus

A run session is A run session is composed by all or some composed by all or some sub-systems and, inside a sub-systems and, inside a given sub-system, by a given sub-system, by a selected partition of its selected partition of its

resourcesresources

Page 11: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200211

CMS

GUIGUI

Session Session ManagerManager

servicesservicesSub-System Sub-System Controller AController A

resourcesresources

GUIGUI

Session Session ManagerManager

Sub-System Sub-System Controller AController A

resourcesresources

run session run session 11 run session run session 22

Run session concurrency and services sharedRun session concurrency and services shared

TheThe

are sharedare shared

Multiple run session may coexist and run concurrently. Every activated run session has the Multiple run session may coexist and run concurrently. Every activated run session has the own Session Manager that is in charge to coordinate the specific run session.own Session Manager that is in charge to coordinate the specific run session.

Partition 1Partition 1 Partition 2Partition 2

Page 12: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200212

CMS

Run Session: exampleRun Session: example

1)1) The user makes login and receives own profileThe user makes login and receives own profile

2)2) The user requires to RS the session listThe user requires to RS the session list

3)3) Session activation or session joinSession activation or session join

4)4) The user send commands ( start, stop, etc )The user send commands ( start, stop, etc )

GUIGUI

loginlogin profileprofile

Security ServiceSecurity Service 11

22

session listsession list

session list?session list?

Session ManagerSession Manager

Resource ServiceResource Service

33

Sub-System Sub-System ControllerControllerSub-System Sub-System ControllerController

Sub-System Sub-System ControllerController

44

startstart

startstartstartstart

startstart

activeactive

ResourcesResources

sessionsession

partitionpartition

Page 13: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200213

CMS

Function Manager and XDAQ adapterFunction Manager and XDAQ adapter

Session ManagerSession Manager

Sub-System Sub-System ControllerController

XMLXML

Sub-System Sub-System ControllerController

XMLXML XMLXML

ResourcesResourcesResourcesResourcesResourcesResources

Function ManagerFunction Manager

XDAQ adapterXDAQ adapter

ResourcesResourcesResourcesResourcesResourcesResourcesXDAQ rs.XDAQ rs.

XMLXML

GUIGUI

XMLXML

The FM is a function engine receiving requests from a SM and transforming them in the proper requests of actions to be sent to the sub-system resource

Every SSC receives commands from the SM and dispatches them to its own DAQ resources

Page 14: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200214

CMS

XDAQ Adapter: block diagram XDAQ Adapter: block diagram

xdaq adapter commands:xdaq adapter commands:

clear, configure, enable, halt, reset, resume, suspendclear, configure, enable, halt, reset, resume, suspend

RS ProtocolRS Protocol

XMLXML

XDaq ProtocolXDaq Protocol

xdaqxdaqxdaq adapterxdaq adapter

command-enginecommand-engine

cmdcmd + RS object+ RS object

cmd + xdaq DOM nodecmd + xdaq DOM node

SOAP messageSOAP message

A XML protocol adapter has been developed to be A XML protocol adapter has been developed to be included in the Function Manager to convert on the included in the Function Manager to convert on the flight the Resource Service Protocol into XDAQ Protocolflight the Resource Service Protocol into XDAQ Protocol

Page 15: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200215

CMS

Function ManagerFunction Manager

xdaq adapterxdaq adaptercommand-enginecommand-engine

Resource Resource ServiceService

xdaqxdaq xdaqxdaq xdaqxdaq

Session managerSession manager

XDAQ Adapter - Function ManagerXDAQ Adapter - Function Manager

GUIGUI

SessionSession

PartitionPartition

Session’s listSession’s list

Page 16: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200216

CMS

Finite State Machine (FSM)Finite State Machine (FSM)

Function Managers have a built in FSM Function Managers have a built in FSM to track the status of the related to track the status of the related controlled components. The FSM is controlled components. The FSM is composed of a XML definition and a composed of a XML definition and a Java class implementation Java class implementation reppresenting the actions to be reppresenting the actions to be performed.performed.

FSMFSM

XML definitionXML definition

Java implementationJava implementation

Both definition and implementation are Both definition and implementation are managed by the Resource Servicemanaged by the Resource Service

Function ManagerFunction ManagerFSMFSM

XML definitionXML definition

Java implementationJava implementation

Resource ServiceResource ServiceFSMFSM

XML definitionXML definition

Java implementationJava implementation

FSMFSM

XML definitionXML definition

Java implementationJava implementation

FSMFSM

XML definitionXML definition

Java implementationJava implementation

download def. + impl.download def. + impl.

Page 17: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200217

CMS

SM-FM implementationSM-FM implementation

The XDAQ The XDAQ adapter adapter implements implements every every command command defined in the defined in the State Machine State Machine

GUIGUI

XML XMLXML XML

Security ServiceSecurity Service

XMLXML

Session ManagerSession Manager

Resource ServiceResource Service

XMLXML

XMLXML

JavaJava

JavaJava

JavaJava

State MachineState Machine

XDAQ adapterXDAQ adapter

JavaJava

XDAQ rs.XDAQ rs.

FSMFSMXML definitionXML definition

Java implementationJava implementation

XDAQ adapterXDAQ adapter

Page 18: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200218

CMS

Information and Monitor Service (IMS)Information and Monitor Service (IMS)

The IMS collects all the information comming from any DAQ resources or RCMS internal components and stores them in the logDB database.

The informations are cataloged in:

• Messages Messages (error, generic, resource status change)(error, generic, resource status change)

• MonitorMonitorSMSM

FMFM FMFM

error msgerror msg

status change msgstatus change msgIMSIMS

Page 19: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200219

CMS

IMS: information structureIMS: information structure

time stamptime stamp info typeinfo type specific fieldsspecific fieldsmsg idmsg id source idsource id

time stamp (T):time stamp (T): when the message/monitor information has been generatedwhen the message/monitor information has been generated

information type (IType):information type (IType): error, generic, status change, monitorerror, generic, status change, monitor

msg id (MId):msg id (MId): Message/Monitor Identification (Id)Message/Monitor Identification (Id)

source id (SId):source id (SId): the source of the information identified univocally by the session, sub-the source of the information identified univocally by the session, sub-syste, partition, software application and hardware boardsyste, partition, software application and hardware board

specific fields (SFields)specific fields (SFields) whose definition is according to the information typewhose definition is according to the information type

• errorserrors (severity level {none, severe, fatal, abort}, description) (severity level {none, severe, fatal, abort}, description)

• genericgeneric (description) (description)

• resource status changeresource status change (status definition) (status definition)

• monitormonitor (these fields are defined according to theapplication to monitor and to the parameters to (these fields are defined according to theapplication to monitor and to the parameters to acquire. These fields could contain values, tables, histograms, event dumps)acquire. These fields could contain values, tables, histograms, event dumps)

Page 20: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200220

CMS

IMS prototype:IMS prototype:

ResourceStatus Change

Error StatisticsError Statistics

MessageLogger (DB)

State logger

Monitor - HistoryDB

Mes

sage

F

ilter

ing

and

Dis

patc

her

Monitor Info

SystemState Display

Error Statistics Alarm Display

MonitorSystems

Clie

nt S

ubsc

riber Messages (Error, Warning

Generic)

ms

g

message queuemessage queue

IMSIMS

DBDB

FilterFilter

EngineEngine

XPath XPath basedbased

ms

g

subscriber 1subscriber 1

subscriber nsubscriber n

Page 21: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200221

CMS

RCMS prototype statusRCMS prototype status

done:done:

• Resource Service with Security ServiceResource Service with Security Service

• Session ManagerSession Manager

• Function Manager (with XDaq adapter)Function Manager (with XDaq adapter)

To be done (before April 2002):To be done (before April 2002):

• IMS with IMS with at leastat least logger and book keeping logger and book keeping functionalityfunctionality

• GUIGUI

• Integration with small daq systems (test beam)Integration with small daq systems (test beam)

Page 22: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200222

CMS

RCMS for small DAQ system demonstratorsRCMS for small DAQ system demonstrators

PC1PC1

PC2PC2

PC3PC3 PC4PC4

TomcatTomcat

SMSM

FMFM FMFM

UIUI

XDAQ resourcesXDAQ resources

A single java servlet A single java servlet container has been container has been used, but all the RCMS used, but all the RCMS components comunicate components comunicate by XML documents over by XML documents over http also if they are in http also if they are in the same containerthe same container

Page 23: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200223

CMS

Next Step: web servicesNext Step: web services

We want to increase the system’s scalability using multiple We want to increase the system’s scalability using multiple containers (e.g. one container per service) allocated in containers (e.g. one container per service) allocated in different server machines.different server machines.

We need a service locator (network DNS) , as the services will We need a service locator (network DNS) , as the services will be dislocate over the network. Web Service tecnology can be be dislocate over the network. Web Service tecnology can be used for that.used for that.

Service 1Service 1

Service nService n

UDDIUDDIWSDLWSDL

The single servlet container describes the services they offer by means of the Web Service Description Language (WSDL) and then publish it to the Universal Description Discovery and Integration (UDDI) registries

clientclientService 1Service 1

Clients looking for services, query first the UDDI server to discover the location of the service and then access to it

Tomcat 1Tomcat 1

Tomcat 2Tomcat 2

Page 24: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200224

CMS

Web Services products suitable for our applicationWeb Services products suitable for our application

• Java Web Service Developer Pack (WSDP)Java Web Service Developer Pack (WSDP)– UDDIUDDI– WSDLWSDL– TomCatTomCat

• SilverStream SilverStream

• Oracle Java Developer PackageOracle Java Developer Package

• Etc.Etc.

Page 25: RCMS for XDaq based small DAQ Systems M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,

Luigi Zangrando, Cern, 05/03/200225

CMS

ConclusionsConclusions

• A RCMS prototype to be integrated in small daq systems (test A RCMS prototype to be integrated in small daq systems (test beams, validation chamber, etc.) will be soon ready (April 2002).beams, validation chamber, etc.) will be soon ready (April 2002).

• Most of the RCMS components have been developed and tested.Most of the RCMS components have been developed and tested.

• A first implementation of the IMS (Information and monitor A first implementation of the IMS (Information and monitor service) will be delivered in the next few weeks.service) will be delivered in the next few weeks.

• A new RCMS prototype targeted to test the scalability of the A new RCMS prototype targeted to test the scalability of the system and based on the web service technology is expected system and based on the web service technology is expected for June. for June.