of scientific legacy systems
play

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


  1. 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) Gøran K. Olsen (SINTEF ICT) Ute Brönner (SINTEF M&C) Nils Rune Bodsberg (SINTEF M&C) SINTEF Materials and Chemistry 1

  2. Outline • 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 SINTEF Materials and Chemistry 2

  3. Background: Oil spill modelling • 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 SINTEF Materials and Chemistry 3

  4. Activities at SINTEF M&C MET (Marine Environmental Technology) • Laboratories – Oil chemistry – Analysis – Biology • Meso-scale testing – Weathering and equipment testing – Sediments and shoreline • Field studies – Oceanography – Surveillance – Releases • Experimental • Accidental • Modelling SINTEF Materials and Chemistry 4

  5. SINTEF M&C MET at a glance Physics Mathematics Meso-scale Lab studies experiments Microbiology Ecotoxicology Statistics Ecology Informatics Numerical Field trials simulation Organic Analytical Oceanography chemistry chemistry • About 40 employees • Turnover: 40-50 mnok - 90% petroleum industry, 10% governmental on average - 30% international portfolio • Based in Trondheim, Norway SINTEF Materials and Chemistry 5

  6. Oil spills – fate and effects Biological effects Surface processes: Response actions • drifting, spreading Volatilization from water to air • natural dispersion • emulsification • evaporation surfacing of droplets, slick formation • stranding dissolution from entrained droplets degradation particulate adsorption/desorption settling sediments: deposition, dissolution, degradation SINTEF Materials and Chemistry 6

  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 SINTEF Materials and Chemistry 7

  8. Oil spill-related decisions ” Should the Lofoten area be opened for oil production ?” Decisions on three levels: • Strategic • “Where should oil booms for Tactical the Heidrun field be stored?” • Operational ” What do we do now? Apply dispersants, or use oil booms?” – 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 SINTEF Materials and Chemistry 8

  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 SINTEF Materials and Chemistry 9

  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++ SINTEF Materials and Chemistry 10

  11. MEMW/OSCAR screenshot (1) SINTEF Materials and Chemistry 11

  12. MEMW/OSCAR screenshot (2) SINTEF Materials and Chemistry 12

  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) SINTEF Materials and Chemistry 13

  14. Motivation: Modernizing a Fortran/C++ legacy app • 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 SINTEF Materials and Chemistry 14

  15. Approach Overview Step 1 (modelling) Step 2 (code generation) Step 3 (deployment) SINTEF Materials and Chemistry 15

  16. Migration Profile: Component types Class Native Integration Executable (DLLs..) programs Database integration <<stereotype>> <<stereotype>> <<stereotype>> Exe JNI DB <<stereotype>> <<stereotype>> <<stereotype>> WebService RestfulWS External Calls to Web External Services Data from Libraries Restful (Java) Web Services 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. SINTEF Materials and Chemistry 16

  17. PredictOildriftService – Use Cases Use case diagram not used for code generation (only for documentation purposes) SINTEF Materials and Chemistry 17

  18. Service Behaviour – Sequence diagram Sequence diagram not used for code generation (only for documentation purposes) SINTEF Materials and Chemistry 18

  19. The service interface SINTEF Materials and Chemistry 19

  20. Service and legacy components SINTEF Materials and Chemistry 20

  21. Service de-composition SINTEF Materials and Chemistry 21

  22. Data types used in the service(s) SINTEF Materials and Chemistry 22

  23. Implementation of service operations in activity diagram The activity diagram orchestrates calls to other components... SINTEF Materials and Chemistry 23

  24. Transformations – code generation import "WebServiceGen.m2t" // import "DataTypeGen.m2t" • Transformations are written in MOFScript import "EntityGen.m2t" import "PersistenceManager.m2t" • Open source EMF-based model- import "stdlib.m2t" to-text generator for Eclipse texttransformation uml2service (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { • http://www.eclipse.org/gmt/mofscript/ var model:uml.Model = uml; • From this, we generate uml.Type::main () { usePersistence = true; • Interfaces var entPack:uml.Package = null; • Service implementation if (self.isService()) { • Various legacy wrapper code self.startGen(); • Behavior from activity diagram } • … (Also supports JPA mappings of entities) } ----- 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 (); ..... SINTEF Materials and Chemistry 24

  25. Web client  Web service  Legacy Simulation SINTEF Materials and Chemistry 25

  26. Data transformations – done manually • 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 SINTEF Materials and Chemistry 26

  27. Usages of migrated system • ”ENVISION” ( Environmental Services Infrastructure with Ontologies): • EU FP7 research project to develop User input (In1) Spill data (location, time, amount, oil type) service composition platform (Ps1) PredictOilDrift (In2 & In3) Wind, current forecasts Oil DB (In4) Sea depth data • ” NorSpill ”: (In5) Coast line data • Next-generation operational oil drift (Out1) Oil drift predictions model for Norwegian met office (Ps2) PredictCodEffects (In 6) Cod species and population data (Out2) Cod effect predictions (Ad) Sanctuaries data (Ad) Ship location data (Ad) Response facilities data SINTEF Materials and Chemistry 27

Recommend


More recommend