Services - INFN-LNL

Download Report

Transcript Services - INFN-LNL

CMS
RCMS for XDaq based small
DAQ Systems
M. Gulmini, M. Gaetano, N. Toniolo, S. Ventura,
L. Zangrando
INFN – Laboratori Nazionali di Legnaro
Luigi Zangrando, Cern, 05/03/2002
1
CMS
RCMS: definition
The Run Control Monitor System is defined as the software required to:
• configure and set the CMS apparatus ( partitions or whole system)
• control and synchronize operation of the separate components
• monitor the separate components
• handle errors and information messages
• log continuously the current state of the experiment
• provide a user interface for both control and monitor
UI
The RCMS architecture
enables the users to
access and control the
experiment from any
part of the world
UI
Internet
Intranet
RCMS
UI
Luigi Zangrando, Cern, 05/03/2002
2
CMS
RCMS context
UI
UI
UI
Session
Manager
RCMS
Services
Services
Services Connection
EVB
Ctrl
TRG
Ctrl
CS
Ctrl
BUs EVM RUs
EVB Sub-System
Cal Mu Glbl
TRG Sub-System
CS Sub - System
Luigi Zangrando, Cern, 05/03/2002
DCS
Ctrl
EVF
Ctrl
EVF Sub-System
DCS Sub - System
3
CMS
RCMS: block diagram
GUI
Session
Manager
Sub-System
Sub-System
Controllers
Controllers
Services Connection
RCMS
Security service
db
Resource service
db
Info & Mon s.
db
Job Control
Problem Solver
services
resources
resources
resources
Luigi Zangrando, Cern, 05/03/2002
4
CMS
RCMS status
GUI
Session
Manager
Sub-System
Controllers
Services Connection
RCMS
Security service
db
Resource service
db
Info & Mon s.
db
Job Control
Problem Solver
services
resources
Luigi Zangrando, Cern, 05/03/2002
5
CMS
Tools: APACHE TOMCAT
Servlet container
Java client
Session
Manager
C++ client
APACHE
TOMCAT
Services
HTML client
Sub-System
Controllers
Luigi Zangrando, Cern, 05/03/2002
6
CMS
Tools: XML as communication protocol
Servlet container
Session
Manager
Java client
C++ client
APACHE
TOMCAT
XML / HTTP
XML / HTTP
XML / HTTP
Services
XML / HTTP
HTML client
Sub-System
Controllers
Luigi Zangrando, Cern, 05/03/2002
XML / HTTP
7
CMS
Scalability: multiple containers allocated in different server machines
Internet - Intranet
Session Manager
Servlet container
Sub-System
Sub-System
Sub-System
Controllers
Services
Controllers
Controllers
Session Manager
Sub-System
Controllers
Luigi Zangrando, Cern, 05/03/2002
8
CMS
Tools: 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/
Luigi Zangrando, Cern, 05/03/2002
9
CMS
RCMS: logical view
run session
GUI
GUI
Session
Manager
Sub-System
Sub-System
Controller
Controllers
resources
resources
Luigi Zangrando, Cern, 05/03/2002
Def. run session: hardware
and software needed to
operate a physic or test
run with the whole or a
partition of CMS apparatus
services
A run session is
composed by all or some
sub-systems and, inside a
given sub-system, by a
selected partition of its
resources
10
CMS
Run session concurrency and services shared
GUI
GUI
Session Manager
Session Manager
The
Sub-System Controller
A
services
Partition 1
resources
run session 1
are shared
Sub-System Controller
A
Partition 2
resources
run session 2
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.
Luigi Zangrando, Cern, 05/03/2002
11
CMS
Run Session: example
1
Security Service
login
1)
2)
3)
4)
profile
The user makes login and receives own profile
The user requires to RS the session list
Session activation or session join
The user send commands ( start, stop, etc )
2
session list?
GUI
Resource Service
session list
start
active
3
session
4
Session Manager
start
start
start
Sub-System
Sub-System
Sub-System
Controller
Controller
Controller
partition
Resources
Luigi Zangrando, Cern, 05/03/2002
12
CMS
Function Manager and XDAQ adapter
GUI
XML
Every SSC receives
commands from the SM
and dispatches them to
its own DAQ resources
Session Manager
XML
Sub-System
Controller
XML
XML
Function Manager
XDAQ adapter
Sub-System
Controller
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
Resources
Resources
Resources
Luigi Zangrando, Cern, 05/03/2002
XML
XDAQ rs.
Resources
Resources
Resources
13
CMS
XDAQ Adapter: block diagram
A XML protocol adapter has been developed to be
included in the Function Manager to convert on the
flight the Resource Service Protocol into XDAQ Protocol
RS Protocol
xdaq adapter
cmd + RS object
XML
command-engine
cmd + xdaq DOM node
SOAP message
xdaq
XDaq Protocol
xdaq adapter commands:
clear, configure, enable, halt, reset, resume, suspend
Luigi Zangrando, Cern, 05/03/2002
14
CMS
XDAQ Adapter - Function Manager
Session’s list
Resource
Service
Session
GUI
Session manager
Function Manager
Partition
xdaq adapter
command-engine
xdaq
Luigi Zangrando, Cern, 05/03/2002
xdaq
xdaq
15
CMS
Finite State Machine (FSM)
Function Managers have a built in FSM
to track the status of the related
controlled components. The FSM is
composed of a XML definition and a
Java class implementation
reppresenting the actions to be
performed.
FSM
XML definition
Java implementation
Both definition and implementation are
managed by the Resource Service
Resource Service
Function Manager
FSM
XML definition
Java implementation
Luigi Zangrando, Cern, 05/03/2002
download def. + impl.
FSM
FSM
FSM
XML definition
XML definition
XML definition
Java implementation
Java implementation
Java implementation
16
CMS
SM-FM implementation
Security Service
XML
Java
XML
XML
GUI
Java
Resource Service
XML
Java
Session Manager
The XDAQ
adapter
implements
every
command
defined in the
State Machine
XML
Java
FSM
XML definition
Java implementation
XDAQ adapter
State Machine
Luigi Zangrando, Cern, 05/03/2002
XDAQ adapter
XDAQ rs.
17
CMS
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 (error, generic, resource status change)
• Monitor
SM
status change msg
FM
IMS
FM
error msg
Luigi Zangrando, Cern, 05/03/2002
18
CMS
IMS: information structure
time stamp
info type
msg id
source id
specific fields
time stamp (T): when the message/monitor information has been generated
information type (IType): error, generic, status change, monitor
msg id (MId): Message/Monitor Identification (Id)
source id (SId): the source of the information identified univocally by the session, subsyste, partition, software application and hardware board
specific fields (SFields) whose definition is according to the information type
• errors (severity level {none, severe, fatal, abort}, description)
• generic (description)
• resource status change (status definition)
• monitor (these fields are defined according to theapplication to monitor and to the parameters to
acquire. These fields could contain values, tables, histograms, event dumps)
Luigi Zangrando, Cern, 05/03/2002
19
CMS
IMS prototype:
Message
Filtering and
Dispatcher
Client
Subscriber
Error
Statistics
Error
Statistics
Error
Statistics
Message
Logger (DB)
Alarm Display
Messages (Error, Warning
Generic)
Resource
Status Change
State logger
Monitor - History
DB
System
State Display
Monitor Info
Monitor
Systems
IMS
msg
msg
Filter
message queue
Luigi Zangrando, Cern, 05/03/2002
subscriber 1
Engine
XPath
based
subscriber n
DB
20
CMS
RCMS prototype status
done:
•
Resource Service with Security Service
•
Session Manager
•
Function Manager (with XDaq adapter)
To be done (before April 2002):
•
IMS with at least logger and book keeping
functionality
•
GUI
•
Integration with small daq systems (test beam)
Luigi Zangrando, Cern, 05/03/2002
21
CMS
RCMS for small DAQ system demonstrators
UI
PC1
PC2
SM
Tomcat
FM
FM
A single java servlet
container has been
used, but all the RCMS
components comunicate
by XML documents over
http also if they are in
the same container
XDAQ resources
PC3
Luigi Zangrando, Cern, 05/03/2002
PC4
22
CMS
Next Step: web services
We want to increase the system’s scalability using multiple
containers (e.g. one container per service) allocated in
different server machines.
We need a service locator (network DNS) , as the services will
be dislocate over the network. Web Service tecnology can be
used for that.
Tomcat 1
Service 1
WSDL
Tomcat 2
UDDI
Service 1
client
Service n
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
Luigi Zangrando, Cern, 05/03/2002
Clients looking for services,
query first the UDDI server to
discover the location of the
service and then access to it
23
CMS
Web Services products suitable for our application
• Java Web Service Developer Pack (WSDP)
– UDDI
– WSDL
– TomCat
• SilverStream
• Oracle Java Developer Package
• Etc.
Luigi Zangrando, Cern, 05/03/2002
24
CMS
Conclusions
• A RCMS prototype to be integrated in small daq systems (test
beams, validation chamber, etc.) will be soon ready (April 2002).
• Most of the RCMS components have been developed and tested.
• A first implementation of the IMS (Information and monitor
service) will be delivered in the next few weeks.
• A new RCMS prototype targeted to test the scalability of the
system and based on the web service technology is expected
for June.
Luigi Zangrando, Cern, 05/03/2002
25