26
ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a , A.Caproni ae , R.Cirami e ,P.Di Marcantonio e ,D.W.Fugate d , S.Harrington b , B.Jeram a , M.Pesko c , M.Sekoranja c , H.Sommer a , K.Zagar c a ESO b NRAO c Cosylab d U.Calgary e INAF-AOT [email protected]

ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

Embed Size (px)

Citation preview

Page 1: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

ICALEPCS 2005 - WE2.4-6I

ALMA Common Software

Status and Development

G.Chiozzia, A.Caproniae, R.Ciramie,P.Di Marcantonioe,D.W.Fugated, S.Harringtonb, B.Jerama, M.Peskoc, M.Sekoranjac, H.Sommera, K.Zagarc

aESO bNRAO cCosylab dU.Calgary eINAF-AOT

[email protected]

Page 2: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

2ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Contents

• What is ACS?

• Where are we?

• Main features

• Platforms

• Highlights of the last two years

• Projects and community

• Conclusion

• Component/Container model• Event Handling and Notification Channel• Threading support• Real time• Bulk Data• Simulation• Alarm System• Task and parameters• GUIs• Benchmarking

Page 3: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

3ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

What is ACS?

ACS is a software infrastructure for the development of distributed systems based

on the Component/Container paradigm

• common application framework and design patterns, not just libraries

• well tested software that avoids duplication• make upgrades and maintenance reasonable• common development environment and tools

Page 4: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

4ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Where are we?

• Developed for ALMA and used by several other projects.• ACS is based on a kernel of software contributed by

cosylab and developed for ANKA. Our collaboration started in Trieste at ICALEPCS 1999.

• ½ of allocated development effort spent until now• Total allocated ~25 man years + additional external

contribution (~10).• 9th release• Extensively used in the field:

– ALMA Test Interferometer and labs– ALMA software integrations– Other projects

Page 5: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

5ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Main Features

• ACS provides the basic services needed for object oriented distributed computing. Among these:– Transparent remote object invocation– Object deployment and location based on a

container/component model– Distributed error and alarm handling– Distributed logging– Distributed events

• The ACS framework is based on CORBA and built on top of free CORBA implementations.

Page 6: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

6ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Supported Platforms

• Operating system: Linux, RH-E + other flavours

• Real-time: RTAI and VxWorks

• Languages: C++, JAVA, Python

• CORBA middleware: TAO (& ACE) (C++), JacORB (Java), Omniorb (Python), CORBA services.

• Embedded ACS Container: PC104, Debian, 300Mhz Geode, 256MB RAM, 256 MB flash (CosyLAB microIOC)

Page 7: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

7ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Policy and License: LGPL

• The strategy to provide common features to our users is:– Use as much as possible open-source tools, instead of

implementing things. • Do not reinvent the wheel• Do not pay for licenses

– Identify the best way to perform a certain task among the many possibilities

– Wrap with convenience and unify APIs

• ACS is distributed under LGPL license

Page 8: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

8ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Highlights of the Last Two Years

New in ACS for:

• developers to use in their code: libraries, convenience classes, utilities to improve the quality of the code

• test/integration/administrators, transparently from application code (i.e. in principle transparent to Component developers)

Page 9: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

9ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Component Container Evolution/Cleanup

• Container Services– Full separation between

Container and Container Services

– Cleaner interfaces– Easier to replace Container

implementation– The most important services

provided now by the ContainerServices are…

• Component life cycle– Plain instantiation of

Components not sufficient– Standard lifecycle state

machine introduced for the Container to manage Components

lifecycleinterface:init()cleanUp()

container

Com

p

Com

p

functionalinterface:observe()

container service interfacegetComponent(“CompB”);Logger getLogger();

Page 10: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

10ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Master Component

• ALMA subsystems interact with the Executive.• Executive treat all in the same way.

Lifecycle for subsystems, not only components

• Fits smoothly into acs concept: - each subsystem needs a mastercomponent - it is a component with a specific interface - ACS defines the underlying state machine

• Implementation:

- a generator (using open-architectureware) maps UML to state machines- generator creates convenience base classes - state machine has been refined in a couple of design iterations

• The introduction of the Master Component has been very effective.

• Cost of prototype generator not higher than cost of developing the MasterComponent in code

Page 11: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

11ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Event Handling and Notification Channel

• Events are widely used in ALMA for synchronization and asynchronous, *-to-* communication.

• Decoupling of Consumers and Suppliers• Very easy interface:

– Supplier classes– Consumer classes

• Contract based on IDL data structures.• Strong naming conventions and

checking tools• Administrative interface• Quality of service

ALMA Operator

(Java)

CAN bus devices (C++)

ALMA prototype antenna at the ATF

High-level Usage of ALMA Events

Secured Host for CORBA

Notification and Naming

ServicePipeline

processes(Python)

Observation Scheduler

(Java)

Astronomer Consuming

ALMA Events as

They Occur

CORBA Notification

Service Running On

an Unsecured

Server

Telescope Calibration

(C++)

Page 12: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

12ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Threading Support

• Many Components have a multi-threaded structure

• Management of threads was a source of problems

• Developed easy-to-use threading classes:– Override a run() method– Use the thread manager

• Based on ACE Threads in C++, concurrent library in Java

Component

ThreadManager

create<ThreadClass>()add()destroy()suspendAll()resumeAll()terminateAll()

11

Thread

suspend()resume()terminate()onStart()onStop()

0..n

0..1

ControlLoopThread

onStart()runLoop()onStop()

OneShotThread

onStart()run()onStop()

0..n

0..1

1

Page 13: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

13ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

A change in paradigm!

Real-time Support

• VxWorks → TICS• Entire LCU in real-time OS• ACS provides complete

Container/Component in real-time environment

• Support will probably remain for other projects (VLT)

• RTAI → ALMA• RT Kernel inside Linux• Component not real-time ↔

small time-critical functions in Kernel.

• Less code in real-time, but more complex to debug

• ACS provides easy:– Communication with kernel

modules– Logging from kernel modules– Kernel module management

Page 14: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

14ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Bulk Data Transfer

• Requirements from the correlator:– 64 MB (megabyte)/sec

• Based on CORBA A/V streaming service

• TAO C++ implementation

• Very easy interface, based on our use cases

• No CORBA A/V visible

See poster: PO1.032-6

Achieved Performance• Gigabit P2P Ethernet• BD throughput around 800

Mbits/s (~100 MB/s) requirements fulfilled

• CORBA throughput around then 500 Mbit/s (~ 55 MB/s)

• Estimated gain in the throughput around 30%

Page 15: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

15ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Simulation

• Why simulation?– Distributed development

– Features or entire subsystems not yet available

– Test a subsystem in isolation

• Simulation of Components from IDL interface spec.

• Dumb default or “intelligent” simulation

See presentation: WE4A.2-5O

Page 16: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

CERN Laser

ACS Alarm System: LaserFeasibility prototype to re-use

CERN Laser Alarm System (TH2.3-7O)

Keep the same API

Reuse the LaserAlarm Console

ACS Component/Cont

ainer replaces J2EE

acsjms implements jms for ACS on top

of Notification Channel

IDL interfaces replace EJB interfaces

Reimplementation

of Laser interfaces

The challenge: reuse a complete subsystem/service in a verydifferent software infrastructure

Page 17: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

17ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Tasks and Parameters

• ACS is used in ALMA also as data reduction infrastructure framework• Requirement:

data reduction to be started as a stand-alone process.A program which starts-up, performs processing and shuts down.

• Implementation:– Stand alone executable– Static container– Works with and without ACS suite

• Input parameters are complex data sets:– Parameter set definition (xml)– Parameter set instantiation (xml)– Validation – Parsing

Page 18: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

18ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

GUIsA LabView

prototype has been

implemented

ACS Supports ABeans development with an

Eclipse plug-in

Some projects are using Qt

Different projects and differentsubsystems have different requirements!

Page 19: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

19ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Performance and Benchmarking

• ACS has performance requirements to satisfy

• Changes to code and upgrade of external libraries can affect performance

• Created performance measurements and reporting framework

• Performance of Component to Component communication, notification channel, logging system…

http://www.eso.org/~almamgr/AlmaAcs/Performance/BenchmarkDoc/

Page 20: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

20ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

ACS installations and projects

Page 21: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

21ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

The ACS community

HPTHexapod Telescope(Germany → Chile)

SardinianRadioTelescope(Italy)

OAN 30m (Spain)

ALMA(Chile)

ANKA (Germany)

APEX (Chile)

Page 22: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

22ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

ICALEPCS - 2nd ACS Workshop

Page 23: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

23ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Conclusion

• Core concepts very stable• In use in ALMA and other projects: we have been getting a lot of

useful feedback• A lot of work to do:

– Most packages available, but features incomplete– In particular scalability and performance issues. We know what to do.– Make easier the life of developers: abstract concepts, code generation

(ACS code generation developed by community).

Having a user’s base in addition to our main project has provided important feedback,

cross-fertilization of concepts and ideas and contributed to software quality

Page 24: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

24ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Questions (& Answers)

http://www.eso.org/projects/alma/develop/acs

MO2.2-1I The ALMA Computing Project – Update and Management Approach

WE2.4-6I The ALMA Common Software ACS Status and Developments

WE3A.3-6O The ALMA Telescope Control System

WE4A.2-5O A generic software interface simulator for ALMA common software

PO1.032-6 Transmitting huge amounts of data design implementation and performance of the bulk data transfer mechanism in ALMA ACS

PO1.100-8 Migration from ACS 1.1 to ACS 4 at ANKA

PO2.067-4 ALMA Correlator Real-Time Data Processor

TH2.3-7O First Operational experience with Laser (K.Sigerud, CERN)

ICALEPCS Papers

Page 25: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

25ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Reserve slides

Page 26: ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status and Development G.Chiozzi a, A.Caproni a e, R.Cirami e,P.Di Marcantonio e,D.W.Fugate d, S.Harrington

26ICALEPCS 2005 - WE2.4-6I ALMA Common Software Status

Performance

1471

2049

996

1659

2105

1065

0 0

125

981

1133

334

546

2013

9

1000

0 26

0

500

1000

1500

2000

2500

cpp py java cpp py java

Event Channel Throughput (100 bytes)

Average Throughput

Best Throughput

Worst Throughput

0

5000

10000

15000

20000

25000

Logs per second

AverageThroughput

BestThroughput

WorstThroughput

C++ Logging

10 bytes

25 bytes

100 bytes

1000 bytes

5000 bytes

Average C++ throughput: 1500 event/s (100 bytes)

Average C++ throughput: 3500 event/s (100 bytes)