diff options
Diffstat (limited to '')
-rw-r--r-- | site/trunk/site-publish/quick-guide-to-sca.html | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/site/trunk/site-publish/quick-guide-to-sca.html b/site/trunk/site-publish/quick-guide-to-sca.html new file mode 100644 index 0000000000..340e75f96a --- /dev/null +++ b/site/trunk/site-publish/quick-guide-to-sca.html @@ -0,0 +1,220 @@ + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE- 2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<HTML> + <HEAD> + <!-- generateKeywords macro --> + <META name="description" content="Apache Tuscany"> + <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource"> + <!-- generateKeywords macro end --> + + <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css"> + <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico"> + <TITLE>Apache Tuscany : Quick Guide to SCA</TITLE> + <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD> + + <BODY onload="init()"> + <!-- topNav macro --> + <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg"> + <TR> + <TD valing="top" align="left"> + <A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A> + </TD> + <TD> + <A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A> + </TD> + + <TD width="100%"> + + </TD> + + <!-- Adds the edit page link to the top banner--> + <TD valign="bottom"> + <DIV style="padding: 2px 10px; margin: 0px;"> + <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=53196"> + <IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A> + </DIV> + </TD> + + </TR> + </TABLE> + <!-- topNav macro end --> + + <!-- breadCrumbs macro --> + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR class="topBar"> + <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%"> + <A href="home.html" title="Apache Tuscany">Apache Tuscany</A> > <A href="home.html" title="Home">Home</A> > <A href="sca-overview.html" title="SCA Overview">SCA Overview</A> > <A href="sca-java.html" title="SCA Java">SCA Java</A> > <A href="java-sca-documentation-menu.html" title="Java SCA Documentation Menu">Java SCA Documentation Menu</A> > <A href="sca-java-user-guide.html" title="SCA Java User Guide">SCA Java User Guide</A> > <A href="" title="Quick Guide to SCA">Quick Guide to SCA</A> + </TD> + + <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true"> + <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A> + </TD> + </TR> + </TABLE> + <!-- breadCrumbs macro end --> + + + <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF"> + <TR> + <TD align="left" valign="top"> + + <!-- pageContent macro --> + <DIV id="PageContent"> + + <DIV class="pagecontent"> + <DIV class="wiki-content"> + <P><BR class="atl-forced-newline"></P> +<DIV class="panel" style="background-color: #ffffff;border-color: #6699ff;border-style: solid;border-width: 1px;"><DIV class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #6699ff;background-color: #D5EFFF;"><B>A quick guide to SCA</B></DIV><DIV class="panelContent" style="background-color: #ffffff;"> +<P>Purpose of this guide is to help you understand the high level concepts in SCA as it relates to the specification. For more details on SCA please refer to the various specifications available at www.osoa.org.</P> +<TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR></TR></TBODY></TABLE><TD class="confluenceTd" valign="top" width="50%"></TD> +<UL> + <LI><A href="#QuickGuidetoSCA-whatisSCA">What is SCA?</A></LI> + <LI><A href="#QuickGuidetoSCA-scacomponent">SCA Component</A></LI> + <LI><A href="#QuickGuidetoSCA-scawire">SCA Wire</A></LI> + <LI><A href="#QuickGuidetoSCA-scacomposite">SCA Composite</A></LI> + <LI><A href="#QuickGuidetoSCA-scacontribution">SCA Contribution</A></LI> + <LI><A href="#QuickGuidetoSCA-scadomain">SCA Domain</A></LI> + <LI><A href="#QuickGuidetoSCA-scabinding">SCA Binding</A></LI> + <LI><A href="#QuickGuidetoSCA-scapolicy">SCA Policy</A> +<BR class="atl-forced-newline"> + </LI> +</UL> +</DIV></DIV><TABLE class="sectionMacro" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR></TR></TBODY></TABLE> +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-whatisSCA"></A><FONT color="#0099cc">What is SCA?</FONT></H2> +<P>SCA is a standard programming model for abstracting business functions as components and using them as building blocks to assemble business solutions. An SCA component offers services and depends on functions that are called references. It also has an implementation associated it with it which is the business logic that can be implemented in any technology. </P> + +<P>SCA provides a declarative way to describe how the services in an assembly interact with one another and what quality of services (security, transaction, etc) is applied to the interaction. Since service interaction and quality of service is declarative, solution developers remain focus on business logic and therefore development cycle is simplified and shortened. This also promotes the development of reusable services that can be used in different contexts. For example, a shopping cart service can be used in a retail application or a travel application without changing. Services can interact with one another synchronously or asynchronously and can be implemented in any technology.</P> + +<P>SCA also brings flexibility to deployment. A solution assembled with SCA is deployed as a unit and can be distributed over one or more nodes in the network and can be reconfigured without programming changes. </P> + +<P>Applications that adopt SCA programming model can interact with non-SCA applications. Meaning non-SCA application can call into SCA enabled applications and SCA enabled applications can call out into non-SCA enabled applications.</P> + +<P>Now let's talk about SCA building blocks and concepts.</P> + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scacomponent"></A><FONT color="#0099cc">SCA Component </FONT></H2> + +<P>The basic building block for SCA is a component. It is the abstraction of a given business function. A component is described with the following attributes:</P> + +<UL> + <LI><B>Service:</B> Describes the functions that this type of component provides. A component can offer one ore more services. A service is an interface.</LI> + <LI><B>Reference:</B> This describes the dependencies this type of component has in order to function. A reference is an interface.</LI> + <LI><B>Property:</B> This defines configuration parameters that can controls how the business function can behave. For example, what currency to use for an account component.</LI> + <LI><B>Intent policies:</B> This describes assumptions on how the component will behave. There are two types of policies. + <UL> + <LI>Implementation policy- Impact the behavior of an implementation. For example, transaction, monitor and logging</LI> + <LI>Interaction policy - defines how the components behave with one another. For example, security.</LI> + </UL> + </LI> + <LI><B>Implementation:</B> Every component has some implementation associated with it. This can be a new business logic or an existing one that is now being used in the assembly. A business logic can handle different operations and some of which are exposed externally as callable services. Component implementation can be in any technology, for example for example BPEL for business processes or XSL-T for transformations or Ruby for scripting or pure Java. How the services, references, properties and intents are defined for an implementation is specific to that particular implementation type.</LI> +</UL> + + +<P>This is demonstrated below.<BR> +<SPAN class="image-wrap" style="display: block; text-align: center"><IMG src="quick-guide-to-sca.data/component.png" style="border: 0px solid black"></SPAN></P> + +<P>The implementation of a component can be in any language that is suitable for the user, for example BPEL for business processes or XSL-T for transformations or Ruby for scripting or pure Java. How the services, references, properties and intents are defined for an implementation is specific to that particular implementation type. </P> + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scawire"></A><FONT color="#0099cc">SCA Wire</FONT></H2> + +<P>As mentioned above, an SCA component may have zero or more references. Refrences in SCA define how SCA components invoke services. The relationship between a reference and a service is typically demonstrated through a line in a SCA diagrams and is referred to as a wire. </P> + +<P>The term wire can at the begining seem confusing because you may ask how a wire is realized. There is no physical definition for a wire, it is really derived from the relationship between a Service and its refrence(s) at runtime. This is realized through dependency injection in Tuscany. </P> + + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scacomposite"></A><FONT color="#0099cc">SCA Composite</FONT></H2> + +<P>An SCA composite consists of components, services, references, and wires that connect them. A composite is the unit of deployment for SCA.<BR> +A composite can be viewed as a component whose implementation is not code but an aggregation of one or more components co-operating to provide higher level services. Think of composite as a solution, for example a credit check composite may consist of multiple components that together perform the credit checking work. A composite can also be used within a larger solution, for example credit check can be part of a order processing composite. A composite has the same charactersitics as a component. It provides Services, has References to other dependencies, and can be configured using Properties and can have intent policies in just the same way as an individual components can. In thise case, attributes of some of the components that are embedded in the composite get 'promoted' and becom the attribute of the composite. In the example below, you see a calculator composite which consists of 5 components, a calculator service has references to four components:Add, Subtract, Multiply and Divide.</P> + +<P><SPAN class="image-wrap" style="display: block; text-align: center"><IMG src="quick-guide-to-sca.data/calc.jpg" style="border: 0px solid black"></SPAN><BR> +<IMG class="emoticon" src="https://cwiki.apache.org/confluence/images/icons/emoticons/lightbulb_on.gif" height="16" width="16" align="absmiddle" alt="" border="0"> The assembly or wiring is defined in .composite file through Service Component Definition Language (SCDL) that is in XML. For example, calculator.composite would define that calculator component references the other four components.</P> + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scacontribution"></A><FONT color="#0099cc">SCA Contribution</FONT></H2> + +<P>The artifacts that make up a solution get packaged into what is called a contribution. A contribution can take a number of different forms. For example, it could be a jar file, or it could be a directory tree on the file system. A contribution can contain composites, java classes, BPEL processes, XSD files, wsdl files, etc. An SCA application can be divided into multiple contributions with dependencies between them. In general, some services depend closely on other services and it makes sense to package them together. If services are more independent it is best to package them separately so that they can be reused in different contexts. A contribution is a deployable unit. A solution may require multiple contributions that share artifacts and artifacts can be shared between (imported) between contributions.</P> + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scadomain"></A><FONT color="#0099cc">SCA Domain</FONT></H2> + +<P>Contribution packages get contributed to what is called SCA domain which is the scope of adminstration at runtime. An SCA Domain represents a complete runtime configuration, potentially distributed over a series of interconnected runtime nodes and is a logical view of the running applications or a coherent grouping of components that are working together. An SCA Domain typically represents an area of business functionality controlled by a single organization. For example, an SCA Domain may be the whole of a business, or it may be a department within a business.</P> + +<P>Therefore, an SCA domain consists of the definitions of composites, components, their implementations, <B>and the nodes</B> on which they run. Components deployed into a domain can directly wire to other components within the same domain. Communication with services outside of a domain is done through bindings. </P> + + +<P>SCA Domains can vary in size from the very small to the very large:</P> +<UL> + <LI>a very small domain could be one within a test environment inside an IDE</LI> + <LI>a medium sized domain could be a single server or small cluster supporting a single application</LI> + <LI>a large domain could describe all the services within a department or company</LI> +</UL> + + +<P>In a large domain there may be all sorts of policies about where components can run and how they connect to each other or to external services. However, during development one is not concerned with all this. The code is packaged and made available for deployment. Tuscany SCA Java supports contributions in the form of JAR or filesystem. </P> + +<P>Below is an example of domain with two contributions.<BR> +<SPAN class="image-wrap" style="display: block; text-align: center"><IMG src="quick-guide-to-sca.data/domain.jpg" style="border: 0px solid black"></SPAN></P> + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scabinding"></A><FONT color="#0099cc">SCA Binding</FONT></H2> +<P>A binding is used as a means of communication between services and handles the protocols. It defines with what communication method a service can be accessed with or with what communication method it can will access other services. There can be different types of bindings depending on technologies used to develop a solution. For example JMS binding, Webservices binding, Atom binding for web20 interaction, etc. </P> + +<P>Services can be configured with different bindings and there can be multiple bindings for a service. Bindings for the services and references get defined declaratively in the .composite file. There is a default binding called binding.sca which when used leaves the choice of binding to the underlying infrastructure by default.</P> + +<P>The declarative bindings and the abstraction of protocols from business logic brings agility to SCA applications. This allows SCA applications to be purely focused on business logic and not be contaminated with protocol handling information. It also enables the SCA compositions to grow or change without code modification while also working with applications that are not enabled with SCA.</P> + + +<H2><A name="QuickGuidetoSCA-"></A><A name="QuickGuidetoSCA-scapolciy"></A><FONT color="#0099cc">SCA Policy </FONT></H2> +<P>An enterprise application requires control beyond the business functional capability which can include how security is handled in the enterprise or what transactional capability should be applied to services that are offered. SCA policies define the constraints or capabilities that get applied to services and their interaction. Two types of policies are defined in SCA.</P> +<UL> + <LI>Interaction Policies - Define the policies that influence interaction of services for example whether authentication is required or not.</LI> + <LI>Implementation Policies - Define how the components behave at runtime for example whether it is transactional or not.</LI> +</UL> + + +<P>SCA mechanisms for defining policies such as intents and policySets can only be used in the context of a single domain. The fact that policies can be defined declaratively make applications adaptive to the environment that they get deployed into or to changes in the business requirements. <BR> +For more information about policy check out the <A href="http://www.osoa.org/download/attachments/35/SCA_Policy_Framework_V100.pdf" class="external-link" rel="nofollow">sca policy framework specification</A>version=1]</P> + + </DIV> + </DIV> + </DIV> + <!-- pageContent macro end --> + + </TD> + </TR> + </TABLE> + + <!-- footer macro --> + <SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript"> + </SCRIPT> + <SCRIPT type="text/javascript"> + _uacct = "UA-1174707-5"; + urchinTracker(); + </SCRIPT> + + <A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A> + + <DIV class="footer"> + Copyright � 2003-2012, The Apache Software Foundation </BR> + Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation. + </DIV> + <!-- footer macro end --> + + </BODY> +</HTML> |