of Scientific Legacy Systems to Service-Oriented Architectures - - PowerPoint PPT Presentation

of scientific legacy systems
SMART_READER_LITE
LIVE PREVIEW

of Scientific Legacy Systems to Service-Oriented Architectures - - PowerPoint PPT Presentation

Model-Driven Migration of Scientific Legacy Systems to Service-Oriented Architectures Presentation at Model-Driven Software Migration (MDSM) 2011, Oldenburg, Germany, March 1 st 2011 Jon Oldevik (SINTEF ICT) Gran K. Olsen (SINTEF ICT) Ute


slide-1
SLIDE 1

SINTEF Materials and Chemistry

1

Presentation at Model-Driven Software Migration (MDSM) 2011, Oldenburg, Germany, March 1st 2011

Jon Oldevik (SINTEF ICT) Gøran K. Olsen (SINTEF ICT) Ute Brönner (SINTEF M&C) Nils Rune Bodsberg (SINTEF M&C)

Model-Driven Migration

  • f Scientific Legacy Systems

to Service-Oriented Architectures

slide-2
SLIDE 2

SINTEF Materials and Chemistry

  • About oil spill modelling and our department
  • Pilot application: MEMW/OSCAR
  • Motivation: Modernizing a Fortran/C++ legacy app
  • Approach overview
  • Modelling: The migration profile
  • Modelling: The PredictOilDrift pilot
  • Generating code from models
  • About data transformations
  • Conclusion and outlook

2

Outline

slide-3
SLIDE 3

SINTEF Materials and Chemistry

  • Oil spills can have disastrous effects on

human safety, the environment, and businesses

  • Understanding oil spill fate and effects is key

to risk mitigation

  • Much of SINTEF’s knowledge is manifest in

numerical models

  • These models are used for decision support

3

Background: Oil spill modelling

slide-4
SLIDE 4

SINTEF Materials and Chemistry

4

  • Laboratories

– Oil chemistry – Analysis – Biology

  • Meso-scale testing

– Weathering and equipment testing – Sediments and shoreline

  • Field studies

– Oceanography – Surveillance – Releases

  • Experimental
  • Accidental
  • Modelling

Activities at SINTEF M&C MET (Marine Environmental Technology)

slide-5
SLIDE 5

SINTEF Materials and Chemistry

5

SINTEF M&C MET at a glance

Microbiology Ecotoxicology Analytical chemistry Statistics Informatics Ecology Physics Mathematics Organic chemistry Oceanography

Numerical simulation Lab studies Meso-scale experiments Field trials

  • About 40 employees
  • Turnover: 40-50 mnok - 90% petroleum industry, 10% governmental on average - 30% international portfolio
  • Based in Trondheim, Norway
slide-6
SLIDE 6

SINTEF Materials and Chemistry

6

Oil spills – fate and effects

dissolution from entrained droplets degradation surfacing of droplets, slick formation particulate adsorption/desorption settling Volatilization from water to air sediments: deposition, dissolution, degradation Response actions Surface processes:

  • drifting, spreading
  • natural dispersion
  • emulsification
  • evaporation
  • stranding

Biological effects

slide-7
SLIDE 7

SINTEF Materials and Chemistry

7

Types of oil spills

  • Accidental/regular
  • Crude oil/refined products
  • Surface/sub-surface
  • Open sea/near coast/ice-infested waters

Photo: Norwegian Coast Guard

slide-8
SLIDE 8

SINTEF Materials and Chemistry

8

Oil spill-related decisions

Decisions on three levels:

  • Strategic
  • Tactical
  • Operational

– Strategic and tactical decisions are based on historical (statistical) environmental data, whereas operational decisions are based on near real-time sensor or forecast data – Numerical models support decisions on all three levels

”Should the Lofoten area be opened for oil production?” “Where should oil booms for the Heidrun field be stored?” ”What do we do now? Apply dispersants, or use oil booms?”

slide-9
SLIDE 9

SINTEF Materials and Chemistry

9

What models do we have?

  • Over decades, SINTEF M&C MET has developed a wide range of models
  • We have models (and sub-models) within the four sub-domains

– Oil weathering – Oil drift – Biological effects – Response options

slide-10
SLIDE 10

SINTEF Materials and Chemistry

10

How are our models implemented?

  • Our models are engrained in applications (‘app trap’)
  • These applications are used by oil companies and governmental bodies throughout the

world

  • Our main application is MEMW (Marine Environmental Modelling Workbench)
  • MEMW contains the OSCAR (Oil Spill Contingency and Response) model

– Oil weathering – Oil drift – Biological effects – Response options

  • MEMW is a PC Windows applications written in Fortran and C++
slide-11
SLIDE 11

SINTEF Materials and Chemistry

11

MEMW/OSCAR screenshot (1)

slide-12
SLIDE 12

SINTEF Materials and Chemistry

12

MEMW/OSCAR screenshot (2)

slide-13
SLIDE 13

SINTEF Materials and Chemistry

13

Legacy architecture

  • The OSCAR oil drift model runs within the PC/Windows application MEMW
  • MEMW consists of a rich client (presentation layer) written in C++ and a FATES simulation

engine (logic layer) developed in Fortran

  • FATES is invoked when the user starts a simulation
  • All input and output to/from FATES is file-based
  • The rich client also handles data base access /file access for additional data (not from

GUI)

slide-14
SLIDE 14

SINTEF Materials and Chemistry

  • Current system (MEMW) is a commercial, monolithic C++ and Fortran application
  • Deployment and maintenance is per-customer
  • Integration with other systems and data is difficult
  • Rationale for modernisation
  • Deployment and maintenance can be sentralized
  • Facilitate integration with external systems
  • Service integration
  • Facilitate new business models and adaption to customer needs
  • Why modelling?
  • Raises the abstraction-level
  • Provides an effective way of specifying services and integration needs
  • Can be used for code generation

14

Motivation: Modernizing a Fortran/C++ legacy app

slide-15
SLIDE 15

SINTEF Materials and Chemistry

15

Approach Overview

Step 1 (modelling) Step 3 (deployment) Step 2 (code generation)

slide-16
SLIDE 16

SINTEF Materials and Chemistry

Native Integration (DLLs..)

16

Migration Profile: Component types

Class Exe JNI DB WebService RestfulWS External

<<stereotype>> <<stereotype>> <<stereotype>> <<stereotype>> <<stereotype>> <<stereotype>> Executable programs Calls to Web Services Data from Restful Web Services External Libraries (Java) Database integration

The UML migration profile represents semantics of different types of migration features. The semantics are used for code generation. Component types represent different sorts of legacy components.

slide-17
SLIDE 17

SINTEF Materials and Chemistry

17

PredictOildriftService – Use Cases

Use case diagram not used for code generation (only for documentation purposes)

slide-18
SLIDE 18

SINTEF Materials and Chemistry

18

Service Behaviour – Sequence diagram

Sequence diagram not used for code generation (only for documentation purposes)

slide-19
SLIDE 19

SINTEF Materials and Chemistry

19

The service interface

slide-20
SLIDE 20

SINTEF Materials and Chemistry

20

Service and legacy components

slide-21
SLIDE 21

SINTEF Materials and Chemistry

21

Service de-composition

slide-22
SLIDE 22

SINTEF Materials and Chemistry

22

Data types used in the service(s)

slide-23
SLIDE 23

SINTEF Materials and Chemistry

23

Implementation of service operations in activity diagram

The activity diagram

  • rchestrates calls to
  • ther components...
slide-24
SLIDE 24

SINTEF Materials and Chemistry

  • Transformations are written in MOFScript
  • Open source EMF-based model-

to-text generator for Eclipse

  • http://www.eclipse.org/gmt/mofscript/
  • From this, we generate
  • Interfaces
  • Service implementation
  • Various legacy wrapper code
  • Behavior from activity diagram
  • (Also supports JPA mappings of entities)

24

Transformations – code generation

import "WebServiceGen.m2t" // import "DataTypeGen.m2t" import "EntityGen.m2t" import "PersistenceManager.m2t" import "stdlib.m2t" texttransformation uml2service (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { var model:uml.Model = uml; uml.Type::main () { usePersistence = true; var entPack:uml.Package = null; if (self.isService()) { self.startGen(); } … }

  • uml.Class::genClassFile(forwardingClass : uml.Class) {

' /** * * Class ' self.name ' * generated by MOFScript, ' time()', ' date()' */ public class ' self.name ' ' extendsName implements(intsNames) '{ // declarations ' self.genOtherDecl(); self.genPropertyDecl (); .....

slide-25
SLIDE 25

SINTEF Materials and Chemistry

25

Web client  Web service  Legacy Simulation

slide-26
SLIDE 26

SINTEF Materials and Chemistry

  • Existing data stored in binary files handled by legacy app
  • Mapping these data automatically was a challenge
  • Many file formats; many data elements; complex data structures
  • Source and target layouts were quite different
  • So, these transformations were hand-coded
  • We did experiment with a model-based approach
  • Where the data layout knowledge was embedded in a model, from which data readers

and writers could be generated

  • This approach could be useful if there were many different data transformations using

more or less the same data layout

26

Data transformations – done manually

slide-27
SLIDE 27

SINTEF Materials and Chemistry

  • ”ENVISION” (Environmental Services

Infrastructure with Ontologies):

  • EU FP7 research project to develop

service composition platform

  • ”NorSpill”:
  • Next-generation operational oil drift

model for Norwegian met office

27

Usages of migrated system

(Ad) Response facilities data (Ad) Ship location data (Ad) Sanctuaries data

(Out1) Oil drift predictions

(Ps2) PredictCodEffects

(In 6) Cod species and population data

(Out2) Cod effect predictions

(Ps1) PredictOilDrift

(In1) Spill data (location, time, amount, oil type) (In2 & In3) Wind, current forecasts (In4) Sea depth data User input

Oil DB

(In5) Coast line data

slide-28
SLIDE 28

SINTEF Materials and Chemistry

  • We have presented a model-driven approach for legacy

migration to service-oriented architectures

  • Black-box migration by wrapping legacy components

using model-driven and generative techniques

  • Defined a UML profile for migration and a set of code

generators for generating servies and wrapper components

  • We have tested the migration approach on an oil drift

prediction system

  • We have not addressed automation of legacy data

mappings

  • So far, we have only migrated one of the models in MEMW
  • Migrating other models should be “a walk in the park”

28

Conclusion and outlook

slide-29
SLIDE 29

SINTEF Materials and Chemistry

  • SiSaS project:
  • ”SINTEF Software As a Service”
  • Internal strategic project within SINTEF that

focusses on providing scientific software as a service

  • Covers both existing and new software

29

Acknowledgements

SiSaS aS

slide-30
SLIDE 30

SINTEF Materials and Chemistry

?

Questions may also be submitted later to nilsrune.bodsberg@sintef.no

30

Q&A

slide-31
SLIDE 31

SINTEF Materials and Chemistry

31

Thank you!