service oriented software for modern fusion...

21
Barth Seminar, 23.04.2008 1Service Oriented Software for Modern Fusion Experiments A. Werner Wendelstein 7-X, CoDaC-Systems Device Control: J. Schacht, H. Laqua, M. Lewerentz, I. Müller, S. Pingel, A. Spring, A. Wölk Data Acquisition: T. Bluhm, C. Hennig, C. Meier, H. Riemann System Analysis / QA: G. Kühner Data Analysis: J. Svensson +RZG-XDV Support by P. Heimann, J. Maier, H. Kroiss, M. Zilker Modern Fusion Experiment

Upload: vukien

Post on 22-Mar-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

Barth Seminar,  23.04.2008 ‐1‐

Service Oriented Softwarefor

Modern Fusion ExperimentsA. Werner

Wendelstein 7-X, CoDaC-SystemsDevice Control: J. Schacht, H. Laqua, M. Lewerentz, I. Müller, S. Pingel, A. Spring, A. WölkData Acquisition: T. Bluhm, C. Hennig, C. Meier, H. RiemannSystem Analysis / QA: G. KühnerData Analysis: J. Svensson+RZG-XDV Support by P. Heimann, J. Maier, H. Kroiss, M. Zilker

Modern Fusion Experiment

Barth Seminar,  23.04.2008 ‐2‐

Introduction

‐ Steady state plasma!‐ Plasma physics driven control!‐ Largely automated analysis!‐ Huge effort but still with technical risks (W7‐X quench, ITER disruptions)

=> Lunar probe approach: Do the best with all data!

Keywords: Service oriented (SO*), Software as a Service (SaaS)

Where you already use them and what you gain!

The route to structured SOA

Barth Seminar,  23.04.2008 ‐3‐

W7-X Business Model

control

ctrl1ctrl4

ctrl5

ctrl3

ctrl2

ctrl4

ctrl5

daq1 analys1

daq2 analys2

daq3 analys3

daq4 analys4

daq5 analys5

analysis

analysA

analysB

pattern

feedbackparam

time

Plasma Operation + DAQDatabase Transfer

Data Analysis

20 min.

OfflineData Analysis

Database Transfer

predictionmodel1

model2

model3

model4

model5

assessment

model1

Barth Seminar,  23.04.2008 ‐4‐

Example: W7-X Automated Data Analysis

Control Flow

Data Flow

The key in allanalyses!!!

Barth Seminar,  23.04.2008 ‐5‐

W7-X Automated Data Analysis & Modelling

Finite <β> plasma + bootstrap current(VMEC + WebService based parallel extender)

LoWendel

Prediction of divertor heat loads

Barth Seminar,  23.04.2008 ‐6‐

What is a Service?

It is a task, that somebody else can do for you!(e.g. serving a cup of coffee, cleaning your office, sheet of paper with Poincare ...)

Typically some expert calculation (theory), some particular data analysis (exp.), ..!(e.g. mapping, IDA, magnetostatics, power deposition ...)

For computers it is basically a remote procedure call!

Experts and their computers (using their favorite language and OS)!

Interfaces!!!!

Software Components

Barth Seminar,  23.04.2008 ‐7‐

How to use a Service

YourApplication

Service Description<Registry>

Service Description<Web Server>

Service Description<File>Load

Receive

Search &Receive

This machine hasservice functionality,e.g. calculation ofStellarator fields

YourApplication

SomeAction

Bind

YourApplication

Use it<Function Call>

Barth Seminar,  23.04.2008 ‐8‐

How to Define a Service

Frameworks / Standards

CORBA, COM, ICE … ,RESTW3C WebServices

Like a precise(!) contract:(automated code generation)

Stateful or stateless?

(Does the service have some memory?)

Definition of interfaces:

‐ Data Structures‐ Operations‐ Input and output messages

At present we (CoDaC) believe in the future of (stateful) W3C WebServices!

WebServices are part of MS.NET!

Barth Seminar,  23.04.2008 ‐9‐

The W3C Standard: WebServicesThe contract

<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="w7x"

<wsdl:types><xsd:schema

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="CoilInfo"><xsd:sequence>

<xsd:element name="name" type="xsd:string"></xsd:element><xsd:element name="Units" type="xsd:string"></xsd:element><xsd:element name="minCurrent" type="xsd:double"></xsd:element><xsd:element name="maxCurrent" type="xsd:double"></xsd:element><xsd:element name="Windings" type="xsd:int"></xsd:element>

</xsd:sequence></xsd:complexType>...

</wsdl:types>

<wsdl:message name="getCoilDescriptionResponse"><wsdl:part name="parameters" element="tns:CoilDescription"></wsdl:part>

</wsdl:message>

<wsdl:portType name="FunctionsW7XPortType"><wsdl:operation name="getCoilDescription">

<wsdl:input message="tns:getCoilDescriptionRequest"></wsdl:input><wsdl:output message="tns:getCoilDescriptionResponse"></wsdl:output>

</wsdl:operation>...

</wsdl:portType>

<wsdl:binding name="FunctionsW7X" type="tns:FunctionsW7XPortType"><binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /><wsdl:operation name="getCoilDescription">

<wsdl:input> <soap:body use="literal" /> </wsdl:input><wsdl:output> <soap:body use="literal" /> </wsdl:output>

</wsdl:operation> ...

</wsdl:binding>

<wsdl:service name="PlainW7XService"><wsdl:port name="IppHgwPort" binding="tns:FunctionsW7X">

<soap:addresslocation="http://validator1.ipp-hgw.mpg.de:30000/ipp/w7x/mhd">

</soap:address></wsdl:port>

</wsdl:service>

</wsdl:definitions>

Data Types

Messages

Definitions

Operations

Protocol:typ. SOAP

Servicelocation

Barth Seminar,  23.04.2008 ‐10‐

Running the client code:

How to Employ WebServicesServer Side User Side

Building the client code:WSDL file

Stub Compiler:WSDL ‐> Source Code

Compiler:Source Code ‐> Executable

Executable: Run

Service request: SOAP Message

Service response: SOAP Message

Server Function: Run

Barth Seminar,  23.04.2008 ‐11‐

Example: W7-X Field & Vessel Service(Visual Studio C#.NET Express)

Barth Seminar,  23.04.2008 ‐12‐

Service Oriented Fusion InitiativePart of the SEED Project

Usage of real mathematical functions instead of data representation

Comprises 5 frameworks:

With many exchangeable algorithms

Database representing all experiment relevant meta information

General Bayesian modelling framework, representing Bayesian graphs

Service oriented fusion initiative, NetDisponent, LoadProbes, WSBroker

Barth Seminar,  23.04.2008 ‐13‐

Where SOFI Helps: Weaker Code Dependencies

Large Application

Packages(Libraries)

Application with some libraries

Each addition of features adds furtherLibraries

Some libraries are under development

Number of dependencies grows

Application complexity is limited

Barth Seminar,  23.04.2008 ‐14‐

Thin (GUI) Service Client

Console Application

Where SOFI Helps:Application Service + Multi-Facette User Interface

CoreApplication

Services

CoreApplication

Services

One application, many user interfaces!

C#.NET, WinForms

Eclipse Plugin

MatlabHelper Services

Barth Seminar,  23.04.2008 ‐15‐

Example: Tiny Console Application(Line of Sight Intersection Test)

Fast intersection tests (105/s) of this complex structure!No dependencies to any complex program library, only to standard system libraries!

werner@pcwerner:~/afs/soft/i386_linux26/src/hairdryer/vesselintersector> ldd intersectorlinux-gate.so.1 => (0xffffe000)libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4003e000)libm.so.6 => /lib/tls/libm.so.6 (0x400fc000)libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4011f000)libc.so.6 => /lib/tls/libc.so.6 (0x40127000)/lib/ld-linux.so.2 (0x40000000)

Barth Seminar,  23.04.2008 ‐16‐

W7 Code – PIES ServiceWebServices for Parallelisation

W7 Application@ home

PIES Service@Greifswald(function parallelExtender)

PIES Services@Garching(function singleExtender)

112 CPUs

Sends grid points+ equilibrium file

Distributes points

collect results& reports progress

Hutchinson

Data Analysis Application(calculation of coil signals)

105 B(r) calculations,Surface integral takes 2 s2-3 days computation

only 15 min. withParallel WebServices!

Barth Seminar,  23.04.2008 ‐17‐

Where you(!) already use WebServicesMulti-facetted Application

MS ProjectServer 2007

SQL DB

PSI(WebServiceInterface)

http://svproject2/PWA/_vti_bin/psi/Project.asmx?wsdl

(Service Description)

ProjectProfessional

Project Web Access

SAPConnector

(tecneos)

Barth Seminar,  23.04.2008 ‐18‐

CoDaC Plans

W7‐X Poincare & Vessel Structure (service works, prototype use)Parallel Extender Service for VMEC & PIES (service works, prototype, however 

routinely used)Common Data Access for W7‐X & W7‐AS (master’s thesis, in work)Service Maintenance (next master’s thesis)

Global service structure plansDefinition of hardware nodesNetwork structure and transfer ratesEnterprise service bus

PerformanceReliabilityScalabilityMaintainabilitySecurity?

Barth Seminar,  23.04.2008 ‐19‐

Wendelstein 7-X Service Landscape (old slide)

Pool of Services

Vessel/Limiter

CDB

MAG3D

Poincare

Particle Tracer

NetDisponentWS‐Broker

Legacy CodesVMEC

DiagnosticForward Funct.

PIESEquilibrium

NBIBirth Profile

Signal Proc.Digital Int.

Application “LoWendel”Plasma RadiationField Line Diffusion

Application “W7”Magnetic. Config.Slowing Down

...

Tiny Application“Intersector”

Intersection of Sightlines

CoDaStation “Wdia”User Analysis Function

Integrated Data Analysis

W7 Tools

Application “W7‐WS”Linux, C++, Qt

Plugin “W7‐WS”Win, Unix, Eclipse, Java

Application “W7.NET”Win .NET, C#, WinForms

Module “W7.m”MatLab, Java

Barth Seminar,  23.04.2008 ‐20‐

Service Oriented Architecture, Structured SOA(IBM‘s Redbook on SOA Foundation)

Barth Seminar,  23.04.2008 ‐21‐