<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Model-Driven Migration of Scientific Legacy Systems to Service-Oriented Architectures</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Jon</forename><surname>Oldevik</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">SINTEF Information and Communication Technology</orgName>
								<address>
									<addrLine>Forskningsvn 1</addrLine>
									<postCode>0373</postCode>
									<settlement>Oslo</settlement>
									<country key="NO">Norway</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Gøran</forename><forename type="middle">K</forename><surname>Olsen</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">SINTEF Information and Communication Technology</orgName>
								<address>
									<addrLine>Forskningsvn 1</addrLine>
									<postCode>0373</postCode>
									<settlement>Oslo</settlement>
									<country key="NO">Norway</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Model-Driven Migration of Scientific Legacy Systems to Service-Oriented Architectures</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">A731D4951E8219F46B49BF15441F339F</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T04:22+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Model-driven engineering</term>
					<term>legacy migration</term>
					<term>web services</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>We propose a model-driven and generative approach to specify and generate web services for migrating scientific legacy systems to service-oriented platforms. From a model specification of the system migration, we use code generation to generate web services and automate the legacy integration. We use a case study from an existing oil spill analysis application developed in Fortran and C++ to show the feasibility of the approach.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. Introduction</head><p>A large number of existing systems, especially within data and computationally intensive domains, are based on implementations that are becoming increasingly difficult to maintain and evolve <ref type="bibr" target="#b0">[1]</ref>, typically in languages like Cobol and Fortran. Competent personnel with knowledge of these technologies is also becoming a scarce resource. Modernisation toward a service-oriented architecture may also open for new business opportunities.</p><p>In this paper, we investigate a model-driven approach for migrating legacy systems to service-oriented architectures. Our migration strategy is wrapping of existing legacy components. We use the Unified Modelling Language (UML) to specify migration models, or wrappers, that are fed to model-driven code generators to generate a deployable service. This work has been done in the SiSaS project 1 , which has an overall focus of methods and tools for migrating scientific software to serviceoriented architectures.</p><p>We define a migration profile in UML that contains concepts for integrating with existing legacy, such as native libraries, executable programs, and databases, as well as for integrating with existing web services. We establish a modelling approach -a method -for how to specify services using the migration concepts, as well as concepts from SoaML <ref type="bibr" target="#b1">[2]</ref>. Our modelling comprises the interfaces and structure of a service, as well as the behaviour of different service parts.</p><p>Our goal is to create effective and usable means for migrating legacy systems to service-oriented platforms. 1 </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>SINTEF Software as a Service</head><p>Our conjecture is that model-driven and generative techniques can provide these means.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. Motivating Case Study: Oildrift Simulation</head><p>In SINTEF Materials and Chemistry, they have a commercial legacy product for simulating oil drift, which can help predicting the spreading of oil in case of an accidental spill. The system is implemented by a Fortran simulation back-end and a C++ front-end. Now, they want a transition to a service-oriented paradigm to more easily adapt to new customer needs and more flexible business models. Figure <ref type="figure" target="#fig_0">1</ref> illustrates the existing application. The Fortran simulation core is responsible for simulating oil drift based on numerical models. It is invoked from a presentation layer written in C++. All input is file based, and simulation runs in batch mode from some minutes to several days. This approach has worked fine for many years, but there are some apparent challenges with respect to interoperability, integration, and scalability. The goal is to migrate the application to meet new market needs while coping with these challenges.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. Our approach</head><p>We use model-driven engineering techniques to develop the oil drift prediction as a service that wraps the existing simulation engine. UML models are used to specify the service interfaces and the details of the wrapper architecture. From these models, we generate XML schemas for the web service, Java interface and class implementations of the web service, the architecture of the wrapper, and its behavioural implementation. Wrapping of the C++ front-end is out of our scope, since this will be re-designed to fit a web-based interaction paradigm.</p><p>We define a UML migration profile to represent semantics of different types of migration features, such as executables, databases, and native libraries. The code generators use this semantics to generate the necessary integration code. Figure <ref type="figure" target="#fig_2">2</ref> illustrates the high-level approach.  We use UML interfaces and classes to model the structural parts of the system. Service interfaces define the behaviour, and classes define the internal structure of the services. UML composite structures are used for specifying the service de-composition into parts. The service is decomposed by legacy component parts, which is orchestrated by the service to provide its operations. The behaviour of the service and its contained legacy wrapper components is defined by UML activity diagrams.</p><p>To relate the migration models to the service-oriented modelling domain, we use some SoaML concepts to describe services: the stereotype «serviceInterface» is used to denote a service, i.e. the service that wraps the legacy systems. The stereotype «MessageType» is used to specify the data types passed as message input and output of the service.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. The migration profile</head><p>The migration profile contains a set of stereotypes used for adding migration semantics to the UML models. The main purpose of the migration model is to integrate existing legacy functionalities and expose them through well-defined interfaces. To this end, we use standard UML models extended with migration semantics from a profile.</p><p>The Component Types: The component types represent different sorts of legacy components that take part in fulfilling the responsibilities of the legacy system. This might be existing shared libraries, executables, Java libraries, databases, or web services. Figure <ref type="figure" target="#fig_3">3</ref> specifies the set of component types that are in the current profile. The stereotype «WebService» denotes the wrapping of an external web service, i.e. a web service client. «RestfulWebService» denotes the wrapping of a restful web service. Its endpoint is an URI that acts as a data source, which is fetched by the wrapper and used locally. «exe» denotes the wrapping of an executable program. «JNI» denotes the wrapping of a native library, such as a windows shared DLL, using Java Native Interface (JNI). «external» denotes integration with external Java libraries, e.g. provided by a jar file. «db jdbc» denotes the wrapping of a JDBC database. Operations defined in classes of this type represent database SQL queries.</p><p>The profile additionally provides stereotypes for specific types of operations, such as «asynch» for asynchronous operations and «RSOp» for restful service operations. Exceptions can be specified explicitly by classes stereotyped «exception». Throwing and catching of exceptions are specified by dependencies stereotyped «throws» and «catches».</p><p>Behaviour -Activities and Actions: Behaviour is declared by operations in components. The behaviour of these operations are defined by associated activity diagrams. An activity diagram defines behaviour by sequences and branches of actions that are mapped to statements in code generation. Standard (opaque) actions contain embedded Java code. CallOperationActions are used for defining invocations to defined operations of related components. In addition, we define a set of stereotypes in the migration profile for simplifying the action specification:</p><p>«return» is used to denote a return from the method execution with a specific value; «assign» is used to denote an assignment of a value to a variable; «setState» is used to denote the setting of an internal state variable, specifically used for asynchronous and long running operations; «setReturn» is used to set the return value of an asynchronous and long running operation; «param» is used to define an input parameter to a CallOpera-tionAction. It references a previously defined variable; finally, «valueparam» is used to define a literal value as an input parameter to a CallOperationAction.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Modelling the Oildrift Prediction Case</head><p>In this section, we exemplify the use of the migration profile on the oildrift prediction case in terms of structure and behaviour.</p><p>Service Structure and Interface: The service itself is defined by a SoaML «serviceInterface» class, which implements the service interface with a set of exposed operations (Figure <ref type="figure" target="#fig_4">4</ref>). The most interesting of these is the «asynch» operation predictOilDriftAsynch, which provides the main service in the oildrift prediction case. Since the execution of a simulation may run for hours, or even days, the operation is declared as asynchronous. The operation will return immediately with only a session id to identify the session.</p><p>Two additional helper operations are provided for checking execution status (getStatus) and to retrieve the result upon termination (getPredictOilDriftResult). The PredictOilDriftService is a structured class that contains a set of parts: the PredictOilDriftServiceController is the internal orchestration component for the service. All incoming calls are delegated to the controller, which implements the operations of the service. The DataTransformer provides operations for transforming input required by the Fortran simulation engine, and transforming result data after simulation. The FatesWrapper is an «exe» component, which wraps the execution of the Fortran simulation program. The WeatherServiceIntegrator provides operations for integrating with an external weather data provider. It is further de-composed by two parts: a «restfulWebService» called WeatherService and a «JNI»-component called GribDataTransformer. The getWeatherInfo operation gets weather data from a restful web service that provides binary data in the GRIB 2 format. To transform the GRIB-data to the input format used by the simulation engine, an external native library (in this case 2 GRIdded Binary, http://www.wmo.int DLL) is integrated by the GribDataTransformer. The OilDatabase is a «db jdbc»-component, which provides oil type information from an SQL database.</p><p>The data types passed in the service interface are modelled as classes stereotyped using the SoaML stereotype «MessageType». Apart from the stereotype, the data types are specified with standard UML classes with attributes and associations.</p><p>Behaviour: Component behaviour is specified for different operations in the migration model. Behaviour is defined by Activity diagrams that are associated with the operations they implement.</p><p>Figure <ref type="figure" target="#fig_5">5</ref> shows the behaviour of the predictOilDrif-tAsynch operation, which is contained in the Predic-tOilDriftServiceController. All invocations to the service PredictOilDriftService is by convention delegated to its controller part.</p><p>The example with the asynchronous operation is interesting, since it also requires handling of the longrunning external executable. In this case, this is handled by providing a second activity diagram, which specifies the behaviour upon termination of the executable. The first activity diagram specifies the initial behaviour of the operation, up until the call to the executable component.</p><p>The second activity diagram from Figure <ref type="figure" target="#fig_5">5</ref> specifies the behaviour occurring when the execution of the external program has terminated. When the final action is executed, the service state (for this particular session id) is set to a ready state, and the client can fetch the result of the service.</p><p>Our approach for behavioural modelling is tied to the target language, in this case Java, since we in some cases embed small portions of code inside actions. We could get around this by incorporating a richer set of UML actions that can cope with variable declarations, property references, and object creation. This extension will be investigated as part of future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Code generation</head><p>The purpose of the migration models is to automate as much as possible the legacy system migration process. We have developed a set of transformations, or code generators, to support the transition from models to deployable services. They were implemented with the model to text transformation tool MOFScript <ref type="bibr" target="#b2">[3]</ref>.</p><p>IV. Related Work Dorda et al. <ref type="bibr" target="#b3">[4]</ref> give a survey of legacy system modernisation approaches. They distinguish between two main types of modernisation: white-box and black-box modernisation. White box modernisation requires an understanding of the internal parts of a system, and involves re-structuring, re-architecting, and re-implementing the system. Black-box modernisation is only concerned with the input/output, i.e. the interfaces, of the legacy system, and is often based on wrapping. Our approach can be seen as a model-driven black-box modernisation technique. However, the migration also has flavours of white-box migration to it, in particular in understanding and transforming the legacy data formats.</p><p>Within the Object Management Group (OMG), the Architecture-Driven Modernization (ADM) task force <ref type="bibr" target="#b4">[5]</ref> is working on standards to support legacy modernisation, such as meta-models for knowledge discovery, software visualisation, and refactoring.</p><p>Razavian and Lago <ref type="bibr" target="#b5">[6]</ref> present a SOA migration framework -(SOA-MF) -wherein they establish an overall process framework for legacy migration, focusing on recovery and re-engineering, and put it in the context of migration methods such as SMART <ref type="bibr" target="#b6">[7]</ref>. Although our work has not focused on re-factoring or re-engineering, the processes targeting legacy discovery and transformation to new architecture has also been addressed in our work.</p><p>Canfora et al. <ref type="bibr" target="#b7">[8]</ref> present an approach for migrating interactive legacy systems to web services based on wrapping. They define a model (a state machine) of the user interactions, which is the basis for integration with legacy systems through terminal emulation. This process is then exposed as a web service.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. Conclusion and Outlook</head><p>We have presented a model-driven approach for legacy migration to service-oriented architectures, where the focus is black-box migration by wrapping legacy components using model-driven and generative techniques. We have defined a UML profile for migration and a set of code generators for generating services and wrapper components. We have tested the migration approach on an oildrift prediction system, by modelling and generating the services and wrappers required for integration with the various legacy components.</p><p>At this time, we have not addressed automation of legacy data mappings, which is a major concern in legacy modernisation. In the current case study, data mappings between binary data formats where written manually. In future work we will investigate appropriate techniques and tools for specifying data transformations at the model level, and for mapping these to the implementation level.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 .</head><label>1</label><figDesc>Figure 1. Oildrift Prediction -Legacy Application</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 2 .</head><label>2</label><figDesc>Figure 2. Approach Overview</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 3 .</head><label>3</label><figDesc>Figure 3. Component types</figDesc><graphic coords="2,315.00,136.25,251.99,79.71" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 4 .</head><label>4</label><figDesc>Figure 4. Predict Oildrift -Service and Wrapper Components</figDesc><graphic coords="3,54.00,320.84,252.00,121.77" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 5 .</head><label>5</label><figDesc>Figure 5. Predict Oildrift Service Behaviour</figDesc><graphic coords="3,315.00,352.69,147.01,189.44" type="bitmap" /></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgements</head><p>The results reported in this paper are from the SiSaS project (SINTEF Software as a Service). SiSaS is an internal project within SINTEF that focuses on migration of scientific legacy scientific software to services.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<title level="m" type="main">Issues and challenges facing legacy systems</title>
		<author>
			<persName><forename type="first">F</forename><surname>Zoufaly</surname></persName>
		</author>
		<ptr target="com" />
		<imprint>
			<date type="published" when="2002">2002</date>
			<publisher>developer</publisher>
		</imprint>
	</monogr>
	<note type="report_type">Project Management</note>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Service Oriented Architecture Modeling Language (SoaML), FTF Beta 2</title>
		<idno>/2009-12-09</idno>
	</analytic>
	<monogr>
		<title level="m">OMG, Standard ptc</title>
				<imprint>
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
	<note>Object Management Group (OMG)</note>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Toward Standardised Model to Text Transformations</title>
		<author>
			<persName><forename type="first">J</forename><surname>Oldevik</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Neple</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Grønmo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Aagedal</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Berre</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">European Conference on Model Driven Architecture -Foundations and Applications (ECMDA)</title>
				<meeting><address><addrLine>Nuremberg</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2005">2005</date>
			<biblScope unit="page" from="239" to="253" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<title level="m" type="main">A survey of legacy system modernization approaches</title>
		<author>
			<persName><forename type="first">S</forename><surname>Comella-Dorda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Wallnau</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">C</forename><surname>Seacord</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Robert</surname></persName>
		</author>
		<ptr target="http://handle.dtic.mil/100.2/ADA377453" />
		<imprint>
			<date type="published" when="2000">2000</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<ptr target="http://www.omg.org/docs/admtf/07-12-01.pdf" />
		<title level="m">ADM White Paper: Transforming the Enterprise</title>
				<imprint>
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
	<note>OMG, White</note>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Understanding SOA migration using a conceptual framework</title>
		<author>
			<persName><forename type="first">M</forename><surname>Razavian</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Lago</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Czech Society of Systems Integration</title>
				<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">SMART: Application of a method for migration of legacy systems to SOA environments</title>
		<author>
			<persName><forename type="first">S</forename><surname>Balasubramaniam</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><forename type="middle">A</forename><surname>Lewis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><forename type="middle">J</forename><surname>Morris</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Simanta</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">B</forename><surname>Smith</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Service-Oriented Computing -ICSOC 2008, 6th International Conference</title>
				<editor>
			<persName><forename type="first">A</forename><surname>Bouguettaya</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">I</forename><surname>Krüger</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">T</forename><surname>Margaria</surname></persName>
		</editor>
		<meeting><address><addrLine>Sydney, Australia</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2008">December 1-5, 2008. 2008</date>
			<biblScope unit="volume">5364</biblScope>
			<biblScope unit="page" from="678" to="690" />
		</imprint>
	</monogr>
	<note>Proceedings, ser. Lecture Notes in Computer Science</note>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Migrating interactive legacy systems to web services</title>
		<author>
			<persName><forename type="first">G</forename><surname>Canfora</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">R</forename><surname>Fasolino</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Frattolillo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Tramontana</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">CSMR. IEEE Computer Society</title>
				<imprint>
			<date type="published" when="2006">2006</date>
			<biblScope unit="page" from="24" to="36" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
