<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: loosely-coupled-www2009.xml 1012 2009-04-22 21:20:05Z dret $ -->
<?hotspot layout-path="hotspot/hotspot/layout" ?>
<?hotspot kilauea-path="hotspot/kilauea" ?>
<?hotspot layout="ischool+usi" ?>
<hotspot xmlns="http://dret.net/xmlns/hotspot/1" xmlns:hotspot="http://dret.net/xmlns/hotspot/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dret.net/xmlns/hotspot/1  hotspot/hotspot/schemas/hotspot.xsd">
    <configuration>
		<paths img="" listing=""/>
		<link subsections="yes" bookmarks="yes" versions="loosely-coupled-www2009.xml" home="./" help="quick" contents="./" glossary="http://dret.net/glossary/" author="http://dret.net/netdret/"/>
		<outline count-text=" [*]" count-depth="all"/>
		<hyperlink extra=""/>
		<extension file="html" link=""/>
		<counter separator=":&#160;"/>
	</configuration>
	<license uri="http://creativecommons.org/licenses/by/3.0/" short="CC 3.0">
		<div class="license">
			<p><a rel="license" title="view full text of license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" src="hotspot/hotspot/layout/iSchool/iSchool/somerights20.png" border="0" height="31" width="88"/></a></p>
			<p><a class="outlink" rel="license" title="view full text of license" href="http://creativecommons.org/licenses/by/3.0/">This work is licensed under a CC<br/>Attribution 3.0 Unported License</a></p>
		</div>
	</license>
	<title short="WWW2009"><a href="http://dret.net/netdret/publications#pau09a">Paper Presentation</a> at <a href="http://www2009.org/">WWW2009</a> (Madrid, Spain)</title>
	<copyright>2009 Cesare Pautasso and Erik Wilde</copyright>
	<presentation id="index">
		<title>Why is the Web Loosely Coupled? <br/>A Multi-Faceted Metric for Service Design</title>
		<author><a href="http://www.pautasso.info/">Cesare Pautasso</a></author>
		<affiliation><a href="http://www.inf.unisi.ch/">Faculty of Informatics</a>, <a href="http://www.unisi.ch/">University of Lugano</a></affiliation>
		<author><a href="http://dret.net/netdret/">Erik Wilde</a></author>
		<affiliation><a href="http://ischool.berkeley.edu/" title="ISchool">School of Information</a>, <a href="http://www.berkeley.edu/" title="University of California, Berkeley">UC Berkeley</a></affiliation>
		<date short="2009-04-22">April 22, 2009</date>
		<toc class="abstract">Loose coupling is often quoted as a desirable property of systems architectures. One of the main goals of building systems using Web technologies is to achieve loose coupling. However, given the lack of a widely accepted definition of this term, it becomes hard to use coupling as a criterion to evaluate alternative Web technology choices, as all options may exhibit, and claim to provide, some kind of <q>loose</q> coupling effects. This paper presents a systematic study of the degree of coupling found in service-oriented systems based on a multi-faceted approach. Thanks to the metric introduced in this paper, coupling is no longer a one-dimensional concept with loose coupling found somewhere in between tight coupling and no coupling. The paper shows how the metric can be applied to real-world examples in order to support and improve the design process of service-oriented systems.</toc>
		<slide>
			<title>Abstract</title>
			<p class="abstract"><toc class="abstract"/></p>
		</slide>
		<part id="presenters">
			<title>Authors/Presenters</title>
			<slide>
				<img src="usi-complete.png" style="float : right ; width : 25% ; margin-top : 0.5em ; margin-right : 2em ; "/>
				<title>Cesare Pautasso</title>
				<ul>
					<li>Computer Science at <a href="http://www.polimi.it">Politecnico di Milano, Italy</a></li>
					<li>Ph.D. at <a href="http://www.ethz.ch/index_EN">ETH Zürich</a> (2004)</li>
					<li>Post-Doc at <a href="http://www.iks.inf.ethz.ch/">ETH Zürich</a></li>
					<ul>
						<li>Software: <a href="http://www.jopera.org">JOpera: Process Support for more than Web services</a></li>
					</ul>
					<li>Researcher at <a href="http://www.zurich.ibm.com">IBM Zurich Research Lab</a> (2007)</li>
					<li>Assistant Professor at the <a href="http://www.inf.unisi.ch/">Faculty of Informatics</a> (since September 2007)</li>
					<li>Representations: <a href="http://www.pautasso.info">Web</a></li>
				</ul>
			</slide>
			<slide>
				<title>Erik Wilde</title>
				<img src="ischool-logo.png" style="float : right ; width : 25% ; margin-top : 0.5em ; margin-right : 2em ; "/>
				<ul>
					<li>Computer Science at <a href="http://www.tu-berlin.de/eng/">Technical University of Berlin (TUB)</a> (88-91)</li>
					<li>Ph.D. at <a href="http://www.ethz.ch/index_EN">ETH Zürich</a> (92-97)</li>
					<li>Post-Doc at <a href="http://www.icsi.berkeley.edu/">ICSI, Berkeley</a> (97/98)</li>
					<ul>
						<li>book on <q><a href="http://dret.net/netdret/publications#wil98">Technical Foundations of the World Wide Web</a></q></li>
					</ul>
					<li>Various activities back in Switzerland (98-06)</li>
					<ul>
						<li>teaching at <a href="http://www.ethz.ch/index_EN">ETH Zürich</a> and <a href="http://www.fhnw.ch/">FHNW</a></li>
						<li>working as independent consultant (training, courses, consulting)</li>
						<li>research focus on Web architecture and XML technologies</li>
					</ul>
					<li>Professor at the <a href="http://ischool.berkeley.edu/">School of Information</a> (since Fall 2006)</li>
					<ul>
						<li>technical director of the <a href="http://isd.ischool.berkeley.edu/">Information and Service Design (ISD) program</a></li>
					</ul>
					<li>Representations: <a href="http://dret.net/netdret/">Web</a>; <a href="http://twitter.com/dret">twitter</a>; <a href="http://dret.typepad.com/">blog</a></li>
				</ul>
			</slide>
		</part>
		<part id="coupling">
			<title>Coupling in Information Systems</title>
			<slide>
				<title>Web Service Quotes</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<blockquote>The notion of designing services to be loosely coupled is the most important, the most far reaching, and the least understood service characteristic.</blockquote>
				<p class="quotenote"><a href="http://www.informit.com/store/product.aspx?isbn=0321180860"><q>Understanding SOA with Web Services</q>, Eric Newcomer and Greg Lomow, Addison-Wesley, 2004</a></p>
				<blockquote>Loose Coupling is the secret sauce of Web services.</blockquote>
				<p class="quotenote"><a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471768588.html"><q>Service Orient or Be Doomed!</q>, Jason Bloomberg and Ronald Schmelzer, Wiley, 2006</a></p>
			</slide>
			<slide>
				<title>Is WSDL Loosely Coupled?</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<img src="wsdl-coupling-1.png" style="height : 55% ; margin : 2% ; "/>
			</slide>
			<slide>
				<title>Is WSDL Loosely Coupled? Yes!</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<img src="wsdl-coupling-2.png" style="height : 55% ; margin : 2% ; "/>
			</slide>
			<slide>
				<title>Is WSDL Loosely Coupled? No!</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<img src="wsdl-coupling-3.png" style="height : 55% ; margin : 2% ; "/>
			</slide>
			<slide>
				<title>Multi-Faceted Coupling</title>
				<img src="cd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Is interface description like WSDL <q>loosely coupled</q>?</li>
					<ul>
						<li>it is because it allows language-independent services to be used</li>
						<li>it is not because generated code breaks when the interface changes</li>
					</ul>
					<li><q>Coupling</q> depends on perspectives and goals</li>
					<ul>
						<li>there is more than one perspective to look at SOA scenarios</li>
						<li>there is more than one goal to achieve for each of these perspectives</li>
					</ul>
					<li><link href="facets"/> allow to use various perspectives</li>
					<ul>
						<li>they are not <q>dimensions</q> because they are not completely independent</li>
						<li>it is <link href="future-work"/> to better figure out the dependencies</li>
					</ul>
				</ul>
			</slide>
		</part>
		<part id="facets">
			<title>Facets</title>
			<slide>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<title>Coupling Facets</title>
				<ul>
					<li>Your system is <q>loosely coupled</q>? What do you mean by that?</li>
					<li>Your system is <q>tightly coupled</q>? What do you mean by that?</li>
					<li>Coupling is more than just a binary switch</li>
					<li>Apple's <em>Push Service</em> for the iPhone SDK</li>
					<ul>
						<li>pushing notifications is tightly coupled with Apple's infrastructure</li>
						<li>handling notifications is loosely coupled and works like a regular Web app</li>
					</ul>
					<li>iPhone map apps can now be built on an API</li>
					<ul>
						<li>apps are tightly coupled with the iPhone (web-based apps are loosely coupled)</li>
						<li>platform is tightly coupled with the device (high switching costs)</li>
						<li>data flow can be loosely coupled (for example with a RESTful service)</li>
					</ul>
				</ul>
			</slide>
			<slide>
				<title>12 Facet Summary</title>
				<img src="dc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<table rules="groups" width="85%">
					<thead>
						<tr>
							<th>Facet</th>
							<td>Tight Coupling</td>
							<td>Loose Coupling</td>
						</tr>
					</thead>
					<tbody>
						<tr>
							<th><link href="discovery"/></th>
							<td>Registration</td>
							<td>Referral</td>
						</tr>
						<tr>
							<th><link href="identification"/></th>
							<td>Context-Based</td>
							<td>Global</td>
						</tr>
						<tr>
							<th><link href="binding"/></th>
							<td>Early</td>
							<td>Late</td>
						</tr>
						<tr>
							<th><link href="platform"/></th>
							<td>Dependent</td>
							<td>Independent</td>
						</tr>
						<tr>
							<th><link href="interaction"/></th>
							<td>Synchronous</td>
							<td>Asynchronous</td>
						</tr>
						<tr>
							<th><link href="orientation"/></th>
							<td>Horizontal</td>
							<td>Vertical</td>
						</tr>
						<tr>
							<th><link href="model"/></th>
							<td>Shared Model</td>
							<td>Self-Describing Messages</td>
						</tr>
						<tr>
							<th><link href="granularity"/></th>
							<td>Fine</td>
							<td>Coarse</td>
						</tr>
						<tr>
							<th><link href="state"/></th>
							<td>Shared, Stateful</td>
							<td>Stateless</td>
						</tr>
						<tr>
							<th><link href="evolution"/></th>
							<td>Breaking</td>
							<td>Compatible</td>
						</tr>
						<tr>
							<th><link href="code"/></th>
							<td>Static</td>
							<td>None/Dynamic</td>
						</tr>
						<tr>
							<th><link href="conversation"/></th>
							<td>Explicit</td>
							<td>Reflective</td>
						</tr>
					</tbody>
				</table>
			</slide>
			<slide id="discovery">
				<title>Discovery</title>
				<img src="cd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Centralized Registration is tightly coupled</li>
					<ul>
						<li>services register with a centralized UDDI registry</li>
						<li>clients query the registry to discover new services</li>
					</ul>
					<li>Decentralized Referral is loosely coupled</li>
					<ul>
						<li>clients learn about new services by getting <q>a link</q> from other clients</li>
						<li>services may refer clients to other services</li>
					</ul>
				</ul>
			</slide>
			<slide id="identification">
				<title>Identification</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Naming is one of the core tasks in information systems</li>
					<ul>
						<li>without naming, it is impossible to reliably identify anything</li>
					</ul>
					<li>Naming can be done centrally or independently</li>
					<ul>
						<li>centralized authorities often have a limited (non-global) scope</li>
						<li>federated naming has to insure that names and namespaces do not clash</li>
					</ul>
					<li>Tightly coupled naming binds name to a non-global scope</li>
					<ul>
						<li>names leaving that scope have to be <em>contextualized</em> to remain usable</li>
					</ul>
					<li>Loosely coupled naming uses globally unique names</li>
					<ul>
						<li>names can be safely used without additional scoping/context rules</li>
					</ul>
				</ul>
			</slide>
			<slide id="binding">
				<title>Binding</title>
				<img src="dc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li><em>Early binding</em> makes it hard to change binding decisions</li>
					<li><em>Late binding</em> allows more dynamic approach (but may be expensive)</li>
					<li>Binding happens on various levels</li>
					<ul>
						<li>DNS names have to be resolved to IP addresses (<em>CDNs</em> exploit this fact)</li>
						<li>service interfaces could be resolved to service providers</li>
					</ul>
					<li><em>Discovery</em> can be a <em>compile-time</em> or <em>run-time</em> process</li>
					<ul>
						<li>discovering interface descriptions <link href="code">compiles interfaces into code</link> (tightly coupled)</li>
						<li>using uniform interfaces makes it easier to switch services (loose coupling)</li>
						<li>binding to <em>expected resource representations</em> also increases coupling</li>
					</ul>
					<li>Dynamically switching compile-time bindings is very hard</li>
					<ul>
						<li>in theory possible if the services implement the same technical model</li>
						<li>in practice hard to do reliably, rarely done, and tightly coupled</li>
					</ul>
				</ul>
			</slide>
			<slide id="platform">
				<title>Platform</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<table width="85%">
					<tr>
						<td>
							<img style="width : 90% ; margin : 2% ; " src="platform-tight.png"/>	
							<ul>
								<li>Tightly coupled: platform/language dependent</li>
							</ul>
						</td>
						<td>
							<img style="width : 90% ; margin : 2% ; " src="platform-loose.png"/>
							<ul>
								<li>Loosely coupled: platform/language independent</li>
							</ul>
						</td>
					</tr>
				</table>
			</slide>
			<slide id="interaction">
				<title>Interaction</title>
				<img src="cd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Do two services need to be available at the same time in order to successfully interact?</li>
					<ul>
						<li>synchronous → tight coupling</li>
						<li>asynchronous → loose coupling</li>
					</ul>
				</ul>
			</slide>
			<slide id="orientation">
				<title>Interface Orientation</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<img style="width : 85% ; margin : 2% ; " src="interface-orientation.png"/>
				<ul>
					<li><em>APIs</em> hide distribution and heterogeneity</li>
					<ul>
						<li>they also hide the actual protocol required to interact</li>
						<li>apps are tightly coupled with the specific API</li>
					</ul>
					<li><em>Protocols</em> expose the rules for formats for communications</li>
					<ul>
						<li>they require clients to directly interact with services</li>
						<li>the protocol can be implemented by any service client</li>
						<li>there may/should be some internal separation in the client</li>
					</ul>
					<li>APIs are convenient, but protocols are more important</li>
				</ul>
			</slide>
			<slide id="model">
				<title>Model</title>
				<img src="dc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<blockquote>Die Bedeutung eines Wortes ist sein Gebrauch in der Sprache. (The meaning of a word is its use in language.)</blockquote>
				<p class="quotenote"><a href="http://en.wikipedia.org/wiki/Ludwig_Wittgenstein">Ludwig Wittgenstein</a>, <q><a href="http://en.wikipedia.org/wiki/Philosophical_Investigations">Philosophical Investigations</a></q>, 1953</p>
				<ul>
					<li>Shared models often lead to 1:1 serializations of objects</li>
					<li>Shared representations require each peer to map from model to representation</li>
					<ul>
						<li>internally, they can use any model they like</li>
					</ul>
					<li><q>Model sharing</q> should be limited as much as possible</li>
					<ul>
						<li>shared <q>deep models</q> of data → tight coupling</li>
						<li>representations as <q>surface models</q> → loose coupling</li>
					</ul>
				</ul>
			</slide>
			<slide id="granularity">
				<title>Granularity</title>
				<img src="cd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Trade-off between:</li>
					<ul>
						<li>complexity/reusability of the service interface and</li>
						<li> number of interactions required to service a client</li>
					</ul>
					<li>fine-grained → tight coupling</li>
					<ul>
						<li>many functions, often derived from an <link href="model">implicitly shared model</link></li>
					</ul>
					<li>coarse-grained → loose coupling</li>
					<ul>
						<li>few functions that focus on exchanging <link href="model">agreed-upon representations</link></li>
					</ul>
				</ul>
			</slide>
			<slide id="state">
				<title>State</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li><em>Shared State</em> requires expensive session tracking</li>
					<ul>
						<li>tight coupling because services need to keep track of clients</li>
					</ul>
					<li><em>Stateless Interactions</em> keep state either on the client or in resources</li>
					<ul>
						<li>loose coupling because services can treat interactions in isolation</li>
					</ul>
				</ul>
			</slide>
			<slide id="evolution">
				<title>Evolution</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Services should support <em>versioning</em></li>
					<li><em>Compatibility</em> can come in two different flavors</li>
					<ol>
						<li><em>backward compatibility</em>: an older client can work with an newer service</li>
						<li><em>forward compatibility</em>: a newer client can work with an older service</li>
					</ol>
					<li>Coupling can be associated with various compatibility issues</li>
					<ul>
						<li>tightly coupled scenarios require synchronized updates</li>
						<li>loosely coupled scenarios allow independent versioning</li>
					</ul>
				</ul>
			</slide>
			<slide id="code">
				<title>Generated Code</title>
				<img src="dc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li><em>Code generation</em> takes interface descriptions and generates stubs</li>
					<ul>
						<li>it is based on <link href="binding">compile-time binding to interface descriptions</link></li>
						<li>it creates a <link href="orientation">horizontal interface</link> on top of the generated code</li>
					</ul>
					<li>Code can be generated/hardcoded for various aspects of service handling</li>
					<ul>
						<li><em>interaction code</em> handles access functions and handling workflows</li>
						<li><em>resource handling</em> processes representations in RESTful scenarios</li>
					</ul>
					<li><em>Extension mechanisms</em> can be used to create less coupling</li>
					<ul>
						<li>browsers can be extended for handling new media types</li>
					</ul>
				</ul>
			</slide>
			<slide id="conversation">
				<title>Conversation</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Services may provide functionality that requires clients to exchange a set of messages in a certain order</li>
					<ul>
						<li>design-time, explicit conversation description → tight coupling</li>
						<li>run-time, reflective discovery of the conversation → loose coupling</li>
					</ul>
				</ul>
			</slide>
		</part>
		<part>
			<title>Examples</title>
			<slide>
				<title>RESTful HTTP vs. RPC over HTTP vs. WS-*/ESB</title>
				<img src="cc.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<img style="width : 85% ; margin : 2% ; " src="starfish-decomposed.png" title="Comparing RESTful HTTP, RPC over HTTP, and WS-*/ESB"/>
			</slide>
			<slide>
				<img src="cd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<title>Coupling Comparison Summary</title>
				<table width="85%">
					<tr>
						<td width="55%" valign="top">
							<table width="95%">
								<thead>
									<tr>
										<th>Coupling</th>
										<th>REST</th>
										<th>RPC</th>
										<th>WS-*/ESB</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>Loose</td>
										<td align="right">10</td>
										<td align="right">3</td>
										<td align="right">4</td>
									</tr>
									<tr>
										<td>Tight</td>
										<td align="right">0</td>
										<td align="right">4</td>
										<td align="right">5</td>
									</tr>
									<tr>
										<td>Design-Specific</td>
										<td align="right">2</td>
										<td align="right">5</td>
										<td align="right">3</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="45%">
							<img style="width : 90% ; margin : 2% ; " src="starfish.png"/>
						</td>
					</tr>
				</table>
			</slide>
		</part>
		<part>
			<title>Conclusions</title>
			<slide>
				<title>The Web and Web Services</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>The Web is only paralleled by the international phone system</li>
					<ul>
						<li>it looked like a step back from sophisticated GUIs and CORBA</li>
						<li><q>dumbing down</q> GUIs creates powerful network effects</li>
						<li>enterprise IT experiences a crisis caused by weight and rigidity</li>
					</ul>
					<li><em>Web Services</em> were invented to use the Web</li>
					<ul>
						<li>they were designed and built based on a non-Web architectural style</li>
						<li>in their WS-* flavor, they use the Web as transport layer</li>
						<li>as an alternative, <em>RESTful Web services</em> are built like the Web</li>
					</ul>
					<li>RESTful Web services are not <q>the best solution</q></li>
					<ul>
						<li>but they may be good enough and a good fit for <q>loose coupling</q></li>
					</ul>
					<li>How to decide when to use the Web and when to use something else?</li>
				</ul>
			</slide>
			<slide id="future-work">
				<title>Future Work</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Find <em>more facets</em> and how they affect coupling</li>
					<li>Be more disciplined in exploring <em>facet dependencies</em></li>
					<li>Come up with a <em>better visualization</em> of facets</li>
				</ul>
			</slide>
			<slide>
				<title>Summary</title>
				<img src="dd.png" style="float : right ; margin : 0 1em 1em 1em "/>
				<ul>
					<li>Many service-related decisions can be regarded as <em>integration</em> vs. <em>cooperation</em></li>
					<li><em>Distribution</em> and <em>Federation</em> are part of many scenarios</li>
					<li>Information system architectures have different goals</li>
					<ul>
						<li>implementing <em>one integrated logical system</em> with the goal of hiding distribution/heterogeneity</li>
						<li>enabling <em>cooperation among communicating peers</em> with little control of the individual peers</li>
					</ul>
					<li>Architectures and architectural styles are driven by requirements</li>
					<ul>
						<li>there is no such thing as the <q>best architectural style</q></li>
						<li>there is no such thing as the <q>best architecture</q></li>
						<li>architectural styles often are implicit by background or tradition</li>
					</ul>
				</ul>
			</slide>
		</part>
	</presentation>  
</hotspot>
