CMW CORBA-based Controls Middleware at CERN

25
CMW CORBA-based Controls Middleware at CERN CMW team, CERN Kris Kostro, Nikolai Trofimov, Steen Jensen, Jens Andersson, Francesco Calderini, Vito Baggiolini, Francois Chevrier, Slawek Maludzinski

description

CMW CORBA-based Controls Middleware at CERN. CMW team, CERN Kris Kostro, Nikolai Trofimov, Steen Jensen, Jens Andersson, Francesco Calderini, Vito Baggiolini, Francois Chevrier, Slawek Maludzinski. Layout. CMW motivation Architecture Remote Device Access (RDA) CMW servers and clients - PowerPoint PPT Presentation

Transcript of CMW CORBA-based Controls Middleware at CERN

Page 1: CMW CORBA-based Controls Middleware at CERN

CMWCORBA-based Controls

Middleware at CERN

CMW team, CERN

Kris Kostro, Nikolai Trofimov, Steen Jensen, Jens Andersson, Francesco Calderini, Vito

Baggiolini, Francois Chevrier, Slawek Maludzinski

Page 2: CMW CORBA-based Controls Middleware at CERN

Layout

CMW motivationArchitectureRemote Device Access (RDA)CMW servers and clientsAdministration servicesNaming and configuration servicesCurrent statusExperience

Page 3: CMW CORBA-based Controls Middleware at CERN

Motivation for the new middleware

Support for OO programming, in particular Java.Support for publish/subscribe paradigm and event-driven programmingSupport for industrial standards in controls (OPC, SCADA, Windows)New middleware for the LHC era

Page 4: CMW CORBA-based Controls Middleware at CERN

User written

Middleware

Existing or off-shelf

Server Framework API (C++, Java)

Physical Devices (RF, BT, BI, Powering)

Java Control Programs

Middleware Client APIDevice/Property Model Topic Model

CMW Architecture

NamingService

Configu-rationService

RAD programs(VB, Excel)

Servers

Clien

ts

Virtual Devices(Java, C++)

SL-EquipServer

PS-GMServer

OPCGateway

NewServers

CMW Infrastructure

RDA, CORBA, JMS

C++ programs

Page 5: CMW CORBA-based Controls Middleware at CERN

Device Model

Control system consists of named devices (position monitor, beam line)Devices are composed of properties (position, current)Operations on properties set, get, subscribe, unsubscribeDevices are organized into device classes

Page 6: CMW CORBA-based Controls Middleware at CERN

RDARemote Device Access

RDA implements the device modelProperties are represented by name, the API is a narrow oneget() & set() operations implemented as blocking CORBA calls.Subscription updates implemented as CORBA callbacks in user code.Update operations implemented as one-way callsData objects similar to CDEV data

Page 7: CMW CORBA-based Controls Middleware at CERN
Page 8: CMW CORBA-based Controls Middleware at CERN

CMW servers

CMW servers are normally written in C++ and run on LynxOS VME front-ends

Windows servers for OPC, Linux for gatewaysServer framework to support polling and synchronize with timing systemThey are often generic servers configured from Oracle DB

Page 9: CMW CORBA-based Controls Middleware at CERN

OPC ServerServer Classes

SFW

eqsrv Servers

SVMQ

CORBA

Hardware

LynxOS Front-End

RDA

CMW Equip Server

Configurationfrom Database

HardwareMIL1553 driver

Timing eventsfrom network

Server Example: SL-Equip

Page 10: CMW CORBA-based Controls Middleware at CERN

Server Classes

CORBA

Windows (NT, 2000)

RDA

CMW OPC Server

Configurationfrom Database

HardwareOPC server

Server Example: OPC

Mapping between OPC itemsAnd device/properties

Page 11: CMW CORBA-based Controls Middleware at CERN

CMW clients

Java clients are the main category

C++ clients to connect to SCADA systems (PVSS driver)C++ clients for legacy Motif applicationsVB and Excel applications behind a Java or C++ front-end

Page 12: CMW CORBA-based Controls Middleware at CERN
Page 13: CMW CORBA-based Controls Middleware at CERN

Narrow API

DeviceBase device = new DeviceBase("BPM1”);

cs = new DefaultCycleSelector("211e0101");

Data result = device.getData("Pos", cs);

Page 14: CMW CORBA-based Controls Middleware at CERN

System AdministrationAdministration facilities have been described as CORBA interface. All CMW servers implement this interface: RDA servers and also directory and database servers.

Page 15: CMW CORBA-based Controls Middleware at CERN

System Administration (cont.)

Page 16: CMW CORBA-based Controls Middleware at CERN

System Administration (cont.)

The CMW management console allows browsing the server namespace and displaying server state

• The general state of the server (OK, BAD, WARNING) is requested periodically

• More details about server as well as server and client statistics can be obtained through separate methods.

• Servers can be shut-down or restarted remotely and log levels can be set.

Page 17: CMW CORBA-based Controls Middleware at CERN
Page 18: CMW CORBA-based Controls Middleware at CERN

Naming and configuration

Device names are resolved to server names via CORBA directory server connected to Oracle databaseServer names are resolved to CORBA RDA DeviceServerBase objects via the OMG Naming Service (ORBacus Names)

Servers register their names with Naming Service on startupServers can auto configure via a CORBA database server (no Oracle for LynxOS)

Page 19: CMW CORBA-based Controls Middleware at CERN

CMW Directoryserver (Java)

ORACLE

JDBC

CMW DBserver (Java)

ORACLE

JDBC

Java Control Programs

Device ServerIn Front-End

Physical Device

Server configuration

from SQL query

Device name

resolutionDevice access

Naming and configuration

OMGNamingService

Page 20: CMW CORBA-based Controls Middleware at CERN

CMW current stateAll CERN equipment can be accessed via CMWOperational in PS since March 2002Naming and configuration services are operationalMain use is in Java, C++ client recently developedCurrently working on consolidation and improvements (version 2.0)

Page 21: CMW CORBA-based Controls Middleware at CERN

Supported platformsJava

Client and server API’sAdministration tools, CMW Explorer, directory and configuration servers are in Java

C++ Server framework supported on:PowerPC LynxOS 3.1.0Linux IntelWindows 2000

C/C++ Client API on: Linux Windows 2000

Page 22: CMW CORBA-based Controls Middleware at CERN

Actual CORBA implementations

In useORBacus OBE 1.0.1 for C++

LynxOS 3.1.0Linux (i686)

ORBacus JOB 3.3.4, JOB 4.0.4

Have also been usedOrbExpressOmniorb (not in CMW)

Page 23: CMW CORBA-based Controls Middleware at CERN

Experience with CORBACORBA simplifies middleware development Fits well in OO development

but …

Actual ORB implementations require several MB of memory. This restricts use of Middleware.Quality ORBs are rare birdsCan we stick with ORBacus?

Page 24: CMW CORBA-based Controls Middleware at CERN

Some hick-ups

The first “commercial” ORB which we acquired for LynxOS was unusableWe had to improve performance of subscription updates (batch update)Any is inefficient, we switched to use variants insteadStrategy to deal with “misbehaving” subscription clients: unreachable, slow etc.Mostly TCP, not CORBA phenomena

Page 25: CMW CORBA-based Controls Middleware at CERN

References

The Web page of the Controls Middleware project: http://proj-cmw.web.cern.ch/proj-cmw

K. Kostro, N Trofimov, V. Baggiolini, F. Calderini, F. Chevrier, S. Jensen, R. Swoboda “Controls Middleware - The New Generation”, EPAC 2002, Paris, 2-7 June 2002

N. Trofimow, V. Baggiolini, S. Jensen, K. Kostro, F. Di Maio, A. Risso, “Remote Device Access in the New Accelerator Controls”, ICALEPCS ’01, San Jose, USA, 27-30 Nov. 2001.