<?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">Toward Deciding the Existence of Adaptable Services</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Christian</forename><surname>Gierds</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">Humboldt-Universität zu Berlin</orgName>
								<address>
									<addrLine>Unter den Linden 6</addrLine>
									<postCode>10099</postCode>
									<settlement>Berlin</settlement>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Toward Deciding the Existence of Adaptable Services</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">E9ACE343DD06C7A97CC79019EE1F52A7</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T21:21+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>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Service adaptation allows two services to interact properly using a mediator or adapter. In service discovery one question is whether an adaptable service exists for a given service, i. e. whether a service exists which can be interacted with properly by using an adapter. We look at a setting where this question boils down to deciding distributed controllability, and we present an idea for changing an algorithm for controller synthesis which answers this question.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Motivation</head><p>In recent years the idea of service adaptation gained momentum within the scientific community. Services already are a wide-spread paradigm also used in industry. Thus the pool of independently developed services is huge. As services are made to be coupled, the question of service discovery (viz. does a service exist that my service can interact with) plays an important role in Service-Oriented Architectures <ref type="bibr" target="#b5">[6]</ref>. However, as a service might be developed without knowledge about existence of potential partners, it is likely that service discovery fails because of incompatibilities. In this case an adapter <ref type="bibr" target="#b7">[8]</ref> might overcome these incompatibilities. As indicated in Fig. <ref type="figure" target="#fig_1">1a</ref>, the adapter acts as mediator between two services S 1 and S 2 ensuring semantically correct processing of messages and proper termination of the services. In case service discovery fails, i. e. there does not exist any service for direct interaction with, the question concerning service discovery now can be extended to the adapter setting.  Existence of an Adaptable Service: Is there another service and an adapter, such that my service can communicate correctly with this other service using the adapter? This question actually is not easy to answer. It appears, that we may simply apply an algorithm for service selection in order to pick S 2 and an adapter. Service adaptation proposes to create, not to select a mediating service though. As it mainly works on a semantical rather than a functional level adapters are not meant to be stored and be publicly available. Thus the question above would suggest trying to create an adapter for each candidate S 2 .</p><p>Setting. Many newer approaches <ref type="bibr" target="#b0">[1]</ref><ref type="bibr" target="#b1">[2]</ref><ref type="bibr" target="#b2">[3]</ref><ref type="bibr" target="#b3">[4]</ref> recommend to first describe the semantical constraints of an adapter and then to ensure also behavioral correctness (viz. proper termination by coordinated transformation of messages). Figure <ref type="figure" target="#fig_1">1b</ref> shows one possible solution <ref type="bibr" target="#b3">[4]</ref>: Let the services S 1 and S 2 be given, as well as a set of message transformation rules describing valid transformations of messages. These transformations are implemented in an engine service E ensuring the semantically correct exchange of messages. If we find a controller C triggering transformations as they are actually needed, then the composition of E ⊕ C is an adapter.</p><p>For this approach we may assume to have S 1 and at least the transformation rules and thus the engine E given, when looking for a service S 2 . Checking the Existence of an Adaptable Service then asks for a service S 2 for which a controller C exists, such that the composition S 1 ⊕ E ⊕ C ⊕ S 2 properly terminates.</p><p>Contribution. We provide an algorithmic idea to abstract from C and then ask for the existence of an S 2 using existing work on partner synthesis. As to the best of our knowledge the question for the Existence of an Adaptable Service has not been answered so far. The idea proposed in this paper is a first step in solving the problem.</p><p>The ultimate goal is the characterization of all adaptable services. Then, given a candidate in a repository, we could decide, whether an adapter can be computed for this candidate or not. However, this problem will remain for future work. So far, we simply want to be able to check, whether it is possible to find such a candidate, or if no such service exists as the transformation rules are not sufficient for adaptation.</p><p>In the following we first introduce service adaptation on a formal level (Sec. 2). Then we briefly discuss the problem of distributed controllability (Sec. 3)-our main question relates to this problem-before giving an idea for solving the problem in the special case of adapters (Sec. 4). Finally we give an outlook (Sec. 5) on how to extend the solution to partially solve the more general case of distributed controllability.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Service Adaptation</head><p>In the last couple of years many approaches <ref type="bibr" target="#b0">[1]</ref><ref type="bibr" target="#b1">[2]</ref><ref type="bibr" target="#b2">[3]</ref> (among others) emerged for the adaptation of independently developed services. Many of these approaches describe the semantical level of an adapter independently of its control structure. The semantical level is described by message transformation rules defining the transformation of a message in order to meet semantical constraints imposed by its content. Typical transformations range from simple renaming to the combination of several message into one message (or vice-versa), or the creation/deletion of protocol message (e. g., acknowledgments).</p><p>We use previous work <ref type="bibr" target="#b3">[4]</ref> by colleagues and myself based on Petri nets to formally describe the setting (as shown in Fig. <ref type="figure" target="#fig_1">1b</ref>). Using Petri nets gives some advantages: they allow to easily describe distributed models, and message transformation rules can be directly translated into a net structure. <ref type="foot" target="#foot_0">1</ref> We use the typical definition of a Petri net N = (P, T, F, m 0 ) with finite sets of places P , transitions T , a flow relation F ⊆ (P × T ) ∪ (T × P ), and an initial marking m 0 . A marking m : P → N assigns to every place a number of tokens. The firing semantics are as usual: a transition t ∈ T is enabled in a marking m, when all places in the preset are marked appropriatly ((p, t) ∈ F ⇒ m(p) &gt; 0), and t may fire only, if it is enabled and thus changes the marking to</p><formula xml:id="formula_0">m (p) = m(p) − F (p, t) + F (t, p) ∀p ∈ P .</formula><p>An open net additionally uses transition labels to express communication via some channel c: a transition may asynchronously send a message (!c), receive a message (?c)-thus restricting firing if c contains no message-, or it may synchronize (#c). Further we provide a set Ω of final markings, indicating in which state a service is allowed to terminate.</p><p>The approach for adapter synthesis then can be summarized as follows: let us assume to have given service models S 1 and S 2 (as open nets) as well as message transformation rules, which can be canonically translated into an open net E (the engine). Each transition of E is synchronously connected to a controller port, thus allowing full control about the application of transformation rules. We then use existing algorithms for controller synthesis for constructing a controller and thus an adapter, if any exists. The controller's role is to ensure proper termination as transformation rules may not be applied arbitrarily. In the following proper termination is used synonymously to weak termination (viz. it is always possible to reach a final state).</p><p>Figure <ref type="figure">2</ref> shows our (technical) running example. We use the typical graphical notation for Petri nets. Additionally the dashed line shows the boundary of one open net, places indicating a proper final state are depicted using a double line. Communication labels are written inside a transition (omitting the synchronous labels used for communication in the adapter between the lower engine and the upper controller part). Service S 1 (Fig. <ref type="figure">2a</ref>) receives an initial message (?e), waits for an external choice (either ?b 1 or ?b 2 ), sends an appropriate answer (either !t or !c), and returns to its initial state. Service S 2 (Fig. <ref type="figure">2c</ref>) simply sends a message (!m) and waits for a reply (?k); or it may decide to terminate. Within the engine part of the adapter (Fig. <ref type="figure">2b</ref>) we see the communication with S 1 and S 2 as well as the transformation rules (r 1 to r 5 ). In more detail the rules are: As we can see, rules canonically translate into Petri net transitions, where the channel names translate into places. Please note, that there are additional arcs between the engine and controller part that we omitted for sake of simplicity.</p><p>Composition of two open nets A and B is realized by introducing a buffer place p c for each asynchronous channel c and adding an arc (t, p c ) for each transition t with label !c, an arc (p c , t) for each transition t with label ?c, and each pair of transitions with the same synchronous label #c is merged while preserving their individual presets and postsets (Figure <ref type="figure">3</ref> shows an example).</p><p>We now want to change the perspective in order to check the Existence of an Adaptable Service: let us assume we only know about service S 1 and some transformation rules. Does any service S 2 exist, such that S 1 and S 2 are adaptable given the transformation rules? Regarding Fig. <ref type="figure" target="#fig_1">1a</ref> we have given services S 1 and E and are looking for services S 2 and C (where the latter is of minor importance). Nevertheless in our setting we are actually looking for two services that are not allowed to communicate with each other directly-as S 2 and C only communicate with the engine E-but that we can match during construction.</p><p>Let us rephrase the problem a bit: given S 1 ⊕ E, we are looking for a service S 2 , such that we can be sure, an appropriate C also exists.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">The Problem of Distributed Controllability</head><p>The problem we want to solve in the adapter setting-checking for the Existence of an Adaptable Service-relates to the problem of distributed controllability <ref type="bibr" target="#b6">[7]</ref>. Given a service A (S 1 ⊕ E) with two distinguished ports for communication, do two services B 1 (service S 2 ) and B 2 (controller C) exist, such that the composition of B 1 ⊕ A ⊕ B 2 describes a proper system. In this setting, B 1 communicates with A over one port, and B 2 over the other. However, B 1 and B 2 are not allowed to directly communicate with each other.</p><p>The described problem is known to be solvable for acyclic services <ref type="bibr" target="#b6">[7]</ref>; however, for cyclic services there exists strong suspicion, that the problem is in fact undecidable. <ref type="foot" target="#foot_1">2</ref>Although checking the Existence of an Adaptable Service thus relates to a problem suspected to be undecidable, we present an idea for tackling this problem in the special case of adapters. This is possible as the engine of an adapter has a very special structure-every transitions within the engine is under control. The decisions of any controller are very determined, which helps us in predicting a controllers decisions. Thus even in case of cyclic services we can actually decide, whether an adaptable service exists.</p><p>In the next section we exploit this fact by actually foretelling some of the controllers decisions and then checking for the Existence of an Adaptable Service using existing algorithms for partner synthesis.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Existence of Adaptable Services</head><p>In this section we shortly sketch the idea for answering the question, whether a service S 2 exists for a given service S 1 and a set of transformation rules, such that S 1 and S 2 are adaptable with respect to the transformation rules.</p><p>First of all we have to fix an interface for S 2 . Otherwise it is not clear, which messages used within the transformation rules are actually meant to be sent or received-which actually is not always clear from the rules. However, in many cases the rules suggest a certain direction and we leave it to future work to find heuristics for allowing more flexibility in choosing the interface.</p><p>When trying to find S 2 we have to take care of certain points: first, building a central controller (one serving both ports) can be misleading. There exists S 1 and E which have a central controller, but no distributed one (e. g., when S 2 would need to react on messages exchanged between E and C). An algorithm working on the central controller must be aware of this. Second, as we are mainly interested in S 2 we could abstract from the interface (i. e. remove all communication) between engine and controller. This would respect somehow the independence of S 2 and controller C. However, this does not take into account the possibility for design-time coordination of S 2 and C, thus failing in finding any S 2 in many cases, when actually one exists.</p><p>The approach we want to follow is a mixture of both ideas: abstract from the communication between engine and controller, but use information about transitions being part of the engine to decide, whether bad states could be avoided by an yet unknown controller.</p><p>The algorithm <ref type="bibr" target="#b4">[5]</ref> for constructing a controller in the adapter setting presented above is based on communicating automata which can be canonically derived from the reachability graph of S 1 ⊕ E. In our setting there might be many states, where avoiding a deadlock or livelock seems impossible for S 2 alone. For a transition of the engine a controller can however decide not to fire it if it leads unavoidably to bad states.</p><p>Our algorithm for finding an adaptable service S 2 (without generating a corresponding controller part C) can be summarized as follows: Let us have given a service S 1 and an engine E representing message transformation rules. Translate the reachability graph of S 1 ⊕ E into a communicating automaton. If there is a transition with a controller label-a label for communication between engine E and controller C-which results in a state, where reaching a bad state is unavoidable for any S 2 , then remove this transition and all states becoming unreachable. If no such further transitions exist, remove all controller labels (making corresponding transitions communicating with the controller part of an adapter internal) and run the algorithm for partner synthesis. This way we exploit the possibility to rely on a correct decision of C in case it is necessary. As we are only removing transitions where reaching a final state cannot be enforced anymore-neither by S 2 or any controller C-communication between engine and controller is not determined and a level of uncertainty remains, which S 2 has to cope with (viz. S 2 is still not aware of communication between E and C).</p><p>Running example: Let us consider the example in Fig. <ref type="figure">2</ref>. The transition r 3 (creating b 2 ) should fire once for every m received, but never a second time. As we know that r 3 is part of the engine, we know that a C can decide to fire r 3 one time (as a final state is reachable in the example), but never a second time, when no further m was received (as a final state might not be reachable anymore in the example). Thus we remove all transitions related to the second firing of r 3 . We can see the (partial) result of this operation in Fig. <ref type="figure" target="#fig_3">4</ref>. Arcs and labels related to engine transitions are gray, an unavoidable deadlock is indicated by a cross, the removal of arcs by prohibition signs. When we start partner synthesis on the artifact depicted in Fig. <ref type="figure" target="#fig_3">4</ref>, then we get as result a service corresponding to the net initially depicted in Fig. <ref type="figure">2c</ref>. Thus we are able to compute a witness to show that S 1 is adaptable provided the given transformation rules.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusion and Outlook</head><p>The use of adapters extends the setting of Service-Oriented Architectures by some challenging questions. In the case of service discovery we may not only be interested a (compatible) partner service, but also a partner service usable through an adapter would serve our purposes. Thus the question arises if any adaptable service does exist. In case we regard an adapter as a union of semantical constraints and control flow we have provided an algorithmic idea to answer this question. We have omitted a proof for the correctness of this approach. Surely it highly relies on the very special structure of the engine (unique communication labeling, controller always has complete knowledge about the state of the engine, thus decisions are determined, etc.).</p><p>If we want to lift this approach to decide distributed controllability in a more general setting, certain pitfalls are ahead that do not allow to directly apply the idea on arbitrary services. Some major issues are transitions with equal communication labels, a higher degree of uncertainty, and asynchronous communication labels on both ports (asynchronous communication normally needs to be restricted due to undecidability results, what the algorithm is not yet aware of).</p><p>Nevertheless we want to refine the algorithm in a way, that if we abstract an arbitrary two-port service S from one port and find a controlling service for the second port, then only because S is distributed controllable. For the adapter setting we want to show on a formal level, that the algorithm actually decides the problem. Thus if S 1 ⊕ E is distributed controllable, then the algorithm finds some S 2 .</p><p>Further, we would like to characterize all adaptable service. This would allow us to actually do Service Discovery more efficiently without synthesizing an adapter for each candidate service S 2 . We could simply match S 2 against the characterization.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. Two different perspectives (dark-gray means given, light-gray means wanted)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>r 1 : 2 Fig. 2 .Fig. 3 .</head><label>1223</label><figDesc>Fig. 2. Running example: Adapter for two services S1 and S2</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Fig. 4 .</head><label>4</label><figDesc>Fig. 4. Automaton derived from S1 ⊕ E with branches leading to deadlocks removed</figDesc></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">N. B.: The whole theory could be canonically translated into state machines. However we decided to use Petri nets.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">Personal communication with Karsten Wolf. Unpublished result.</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Developing adapters for web services integration</title>
		<author>
			<persName><forename type="first">B</forename><surname>Benatallah</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Casati</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Grigori</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">R</forename><surname>Motahari Nezhad</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Toumani</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">CAiSE</title>
				<imprint>
			<date type="published" when="2005">2005</date>
			<biblScope unit="page" from="415" to="429" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Automated generation of BPEL adapters</title>
		<author>
			<persName><forename type="first">A</forename><surname>Brogi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Popescu</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">ICSOC</title>
				<imprint>
			<date type="published" when="2006">2006</date>
			<biblScope unit="page" from="27" to="39" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Adapt or perish: Algebra and visual notation for service interface adaptation</title>
		<author>
			<persName><forename type="first">M</forename><surname>Dumas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Spork</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Wang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Business Process Management</title>
		<imprint>
			<biblScope unit="page" from="65" to="80" />
			<date type="published" when="2006">2006</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Reducing adapter synthesis to controller synthesis</title>
		<author>
			<persName><forename type="first">C</forename><surname>Gierds</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">J</forename><surname>Mooij</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Wolf</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Services Computing</title>
		<imprint>
			<biblScope unit="volume">99</biblScope>
			<date type="published" when="2010">2010</date>
			<publisher>PrePrints</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Compact representations and efficient algorithms for operating guidelines</title>
		<author>
			<persName><forename type="first">N</forename><surname>Lohmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Wolf</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Fundam. Inform</title>
		<imprint>
			<biblScope unit="volume">108</biblScope>
			<biblScope unit="issue">1-2</biblScope>
			<biblScope unit="page" from="43" to="62" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<title level="m" type="main">Web Services: Principles and Technology</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">P</forename><surname>Papazoglou</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2007-07">Jul 2007</date>
			<publisher>Pearson -Prentice Hall</publisher>
			<pubPlace>Essex</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title level="m" type="main">Does my service have partners? T. Petri Nets and Other Models of Concurrency</title>
		<author>
			<persName><forename type="first">K</forename><surname>Wolf</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2009">2009</date>
			<biblScope unit="volume">2</biblScope>
			<biblScope unit="page" from="152" to="171" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Protocol specifications and component adaptors</title>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">M</forename><surname>Yellin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">E</forename><surname>Strom</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM Trans. Program. Lang. Syst</title>
		<imprint>
			<biblScope unit="volume">19</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="292" to="333" />
			<date type="published" when="1997">1997</date>
		</imprint>
	</monogr>
</biblStruct>

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