<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Dcpt. of Information Systcms, Faculty of Inforrnatiorr Technology, Brno Univcrsity of Technology</institution>
          ,
          <addr-line>BoZetdchova I, 6\2 66 Brno</addr-line>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
      </contrib-group>
      <fpage>29</fpage>
      <lpage>36</lpage>
      <abstract>
        <p>One of many definitions of Service-Oriented Architecture (SOA) says that SOA is an architectural style for building next-generation distributed information systems. If wc want to get a reliable arrd good working system, it must be well designed first. This paper deals with Scrvice-Oriented Architecture Design (SOAD), especially with modeling of scrviccs. F\rrthermore, abstraction layers of SOA are introduced and possiblc using of object oriented approach on each layer is discussed in this paper. Besides, three types of service collaboration are prcscntcd. The rnain objective of the paper is to dernonstrate how thesc typcs of collaboration can bc dcscribed in UML 2.0.</p>
      </abstract>
      <kwd-group>
        <kwd>Scrvicc-Orientcd Architecturc</kwd>
        <kwd>Service-Orierrted Architecture Desigrr</kwd>
        <kwd>Service Co-operation</kwd>
        <kwd>service</kwd>
        <kwd>cornponent</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Although service-oriented architecture is not a new concept in the area of
distributcd softwarc architccturcs, it comes to the forc in rcccnt ycars thanks to
modern technical solutions, e.g. well-defined communication networks and
modeling disciplincs. SOA irnplementatiorr rarely starts on the green field. That
mcans creating a SOA solution is almost based on integrating existing systems
by decomposing thcm into scrviccs, business processes,and business rules. As
a consequence,the SOAD is composition of well-established practices such as
Object-Oricntcd Analyse and Design (OOAD), Enterprise Architecture Design
(EAD), BusinessProccss Modcling (BPM) and some other innovative elements.
Thc idcas presented in this paper are a part of a greater project, which dcals
with a methodology for SOA systemsmodcling. More precisely,the methodology
is aimcd at building models of inner-entcrprisc scrviccs and modcls of
collaborations of such services . Inputs for thc mcthodology are elements generated by
decomposition of lcgacy (nonSOA) systems. For the decomposition an
appropriate method (c.g. SOMA [
        <xref ref-type="bibr" rid="ref9">1</xref>
        ]) is used. Another goal of the methodology is to
firrd how to rrtakethe inrrer.enterpriseservicesaccessiblefbr consumerswho stay
outside of a given cntcrprisc.
      </p>
      <p>This paper describes which object-oricntcd (OO) features and techniqucs
can be used in SOAD and how UML can bc used for modeling of components,
assembling componcnts into scrvices,servicesand a service collaboration.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Background</title>
      <p>There is no 'standard' definition of SOA. In [5] SOA is presented as an approach
for building distributed systems that deliver application functionality as serviccs
to either end-user applications or other services.</p>
      <p>An abstract view depicts SOA as a partially layered architecture. In this
view, SOA consists of three layers: component layer, service layer and business
process layer. There are two sections in parallel with these layers. They provide
tools for integrating components to scrviccs and servicesto busincss processes
and tools for monitoring and maintaining security and QoS of SOA applications.</p>
      <p>Businessprocess</p>
      <p>
        Businessprocess layer
collaboration of instances (objccts) of these classes,and the state of the system
is thc combined state of all the objccts in it. Collaboration among objects is
achicvcd by scnding messages.Since SOA is a new paradigm and services and
obiects are two different concepts, the question is "Could OOAD or a part of
OOAD bc used in SOAD?" The following paragraph discusseswhich OO
fcatures and techniqucs [
        <xref ref-type="bibr" rid="ref7">8</xref>
        ] can be used in SOAD. As mentioned in Introduction,
this papcr dcals only with components and services.Conscqucntly, using OO at
the busincssprocess layer is not described.
      </p>
      <p>- Inf ormation hi,di,ng: SOA services are for scrvicc consumers black boxes
with well-defined interf'aces.The goal is to separate what service does (its
interface) from how it does it (its implemcntation). From the servicespoint of
view, components arc also black boxes. Serviceshave only information about
components intcrfaccs and route requests (for a scrvice) from a consumer to
subordinate components.
- Messaging is the fundamental communication model for components and
scrvices in SOA.
- Inheri,tance car' only be considered on a specification level of component
and service modcling.
- Polymorphi.sm dcscribesthe situation where the result (of a behavior)
depends on the class of an objcct the behavior of which is invoked. In other
words, two or more classesaccept the same message,but respond on it
differcntly. The possible use of polymorphism in SOAD is similar to inheritance.
- Classes and instances: Classesare templates for crcating instances
(objects). From SOA point of view, this concept can be applicd to both
components and scrvices.
- Encapsulat'ion: A service encapsulates the state and bchavior of a number
of components.</p>
      <p>It results from the previous paragraph that except inheritance and polymorphism
thc underlying OO features can bc used in SOA for modeling of components or
scrvices.It should be pointed out that all OO featurcs including inheritance and
polymorphism can be used for modeling thc inner structure of components.
3 Three Types of Collaboration among Services
To model collaborations of services inside an enterprisc, it is useful to
distinguish severai categorics of collaborations. Each category is defined by a set of
communication rules (a protocol) and by the purposc of the collaboration. The
categories are following:
- Thc Seruice Co - operati,on describesa collaboration of services,in which
one service has to use another service(s) to fulfil incoming requests.
- The Seru'ice Aggregati,on is a set of rulcs which defines how to create a
new service from two (or morc) existing serviccs. The new service provides
combined functionality of its building services.
- The Seru'ice Choreography is such collaboration of serviccsthat supports
businessprocess.</p>
      <p>
        The basic concept of service co-operation modeling is explaincd latter in this
paper. More about service choreography can be found in [5], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], the
scrvice aggrcgation is objcct of futurc research.
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Using UML in SOAD</title>
      <p>As mcntioned bcfore, object-oriented technology and languages are great ways
to design and irrrplement courponents. Unified Modeling Language (UML) is
a specification language fbr object modeling. Since there exists a relationship
bctween OO and SOAD (described in scction 2), UML can be used in SOAD.
UML providcs extension mechanisms (stereotypes, tagged values, constraints)
which cnable to model services. This chaptcr describes thc use of UML 2.0
[10] for modeling components, scrvices and scrvice collaboration. Furthermore,
stercotypes for modeling SOA components and serviccs are presented.
4.L</p>
      <sec id="sec-3-1">
        <title>Models of Components</title>
        <p>and Services
In this papcr, we use a simple example of co-opcrating services to demonstrate
the use of the proposcd modeling techniques. We assumetwo collaborating
services: Smath and Splus. Smath offers calculation of some mathematical
operations, but in fact it docs not perform the opcration. It collaborates with other
scrvices. Wc consider only one operation hcrc the sum. The service that really
performs it is rcferred to as Splus. A part of this example is shown in Figure 2.
The figure depicts a model of Smath. The structure of this model is explained in
the following paragraph.</p>
        <p>A servicc is modcled as a stereotype service , which is derived from the
clement component of the UML. Therc are two possible abstract views of a
service - an cxternal and internal one. The internal view (or "white-box" view)
shows how the extcrnal behavior is realized internally. In this case, the inner
structure depicts how component instances arc interconnected to providc the
required functionality. An example of this view is shown in Figure 2 . This level
is used only for components interconnection modeling inside a service. The other
abstract vicw, the extcrnal view (or "black-box" view), is used to model serviccs
in scrvice collaboration. It hides the inner structure (implementation) of services.</p>
        <p>The mapping between the internal and external view is by means of a delegation
connector . It is reprcsented by a port and an UML predefined-stereotypeof
dependcncy detegate The port is shown as a small square symbol on the
boundary of the symbol denoting a service.</p>
        <p>A port delegatcs to a set of subordinate components (and vice versa ). At
cxecution time, signals will bc delivered to the appropriate instance. In thc
caseswhcre multiplc target instances support the handling of the same signal,
the signal will be delivcred to all these subordinate instances.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Modeling of Servicesand ServiceCollaboration in UML 2.0</title>
        <p>Component modeling is easy, bccause UML provides a modeling element
component (a subclassof Class in the UML metamodel). A component is a self
contained unit that is ablc to intcract with its environment through its provided
and requircd interf aces (Classif iers in the UML metamodcl). A component
can be rcplacecl at run-tirne by a componcnt that offers equivalent functionality
based on intcrface compatibility. Components are modeled as "black-boxes".
h{trJn.p |</p>
        <p>| lc*urrtr
,"T"*</p>
        <p>,
| &lt;&lt;component&gt;I&gt;</p>
        <p>:ccheck
|</p>
        <p>I
- service can receivc infinite number of incoming messages
- incomming requests are qucued up into thc input queue
- request processing and communication are processed in parallel
- thc service description of each co-opcrating scrvice is known</p>
        <p>Following two sections introducc fundamcntals of static and dynamic
modeling of servicc co-opcration. Since we focus on modeling servicesinside an
enterprise, we assumeserviceswith fine-grained interfaces.
4.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Static Models of Co-operating</title>
      </sec>
      <sec id="sec-3-4">
        <title>Services</title>
        <p>
          In gcneral, cach servicc can provide its functionality to other services and it can
also rcquire somc functionality from other scrvices. The formcr role of the service
is rcfcrred to as a "servicc providcr" and the latter one as a "service consumer').
Because cach service can play both roles, it should realize a provided interfacc
of thc scrvice provider and has a rcquired intcrface of the scrvice provider. In
addition, sincc the communication of the serviccsis asynchronous,our model is
based on thc Observer pattern [
          <xref ref-type="bibr" rid="ref5">6</xref>
          ].
        </p>
        <p>Figure 3 depicts a static model of co-operating services Snath and Splus.
Here, the servicc Snath plays the role of a serviceconsumer and thc scrvice Splus
plays the rolc of a servicc provider. Both servicesrealize intcrfaces: IProvider
and fConsumer. IProvider contains a mcthod attach(service). Using this
method, a servicc consumer registers at the servicc provider. The registration
also includes a service requcst, which is representcd as a service parametcr of
thc attachO operation in the model. Such requestsarc queued. It is modeled by
mcans of aggregation with the service provider being an aggregate. As soon as the
service provider completcs the requcst processing,a method notifyConsumero
sends a messagc with the result to the service consumer. The corresponding
operation in the model is setResult(servicerslt).</p>
        <p>-i-</p>
        <p>I
r----&lt;-&lt;s-erlv-tc-e&gt;-&gt;----r
| =o'*
|
|
|
theConsumer-&gt; setResult(servicersft)
If we want to model scrvice-to-servicc connection during service co-operation,
we can not usc the approach we used to model components composition inside
a servicc (section 4.1). Components are assembledinto services in advance in
design time. On the other hand, servicescan be discovered and are bound
dynamically. Consequently, we can model service co-operation only by means of
UML behavioral models, namely state machinc and interaction diagrams. We
have chosen a sequence diagram to model communication of services. Since the
rnodeledentities are services,thc diagram have to fulfill the fbllowing restrictions:
- Lifelines are scrvices.
- All messagesamong scrvices are asynchronous.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Modeling of Servicesand Service Collaboration in UML 2.0 3 5</title>
      <p>Thc second rcstriction cnsures that a sender does not wait for a rcplay (after
a rcquest was sent) and the sender can acccpt anothcr incoming messagesor
proccssstored requcsts (replics). Figurc 4 showscommunication of servicesSmath
and Splus from Figurc 3.</p>
    </sec>
    <sec id="sec-5">
      <title>5 Conclusion and F\rture Work</title>
      <p>This paper briefly discussesthe use of object-oriented approach in SOAD. It is
shown that information hiding, messaging, classesand instances, and
cncapsulation arc concepts that can be used in SOAD. In addition, they are supported by
UML. Thereforc, UML was chosen as a modeling languagc for components,
services and servicc co-operation. UML providcs well-defined diagrams for modeling
composition of componcnts inside a service and for modeling collaborations of
serviccs including thcir communication. The future work will focus on
improvcmcnt and extension of the approach mentioned above, especially on creating a
meta-model of servicc co-operation and service aggregation that will enablc to
develop more advanccd and sophisticated models. In addition, it would be uscful
to create some vcrification methods for created models .</p>
      <p>Th'is research has beensupported bg the Grant Agencg of Czech Republ'ic arants
No. 102/05/0723 "A Framework for Formal Speci,ficati,onsand Prototypi'ng of</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>-L. Arsanjani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Service-orierrted rnodeling and architecturc</article-title>
          . Document is available on URL http: llwww-
          <fpage>728</fpage>
          .ibm.com/developerworks/wcbservices/library/wssoa-dcsignl/
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2 .
          <string-name>
            <surname>Bcnatallah</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dijkman</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dumas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Maamar</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Service Composition: Conccpts, Techniqucs, Tools, and tcnds</article-title>
          . In
          <string-name>
            <surname>Stojanovic</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Dahanayake</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . (Eds):
          <article-title>Scrvicc-Oricntcd Softwarc Systcm Enginccring</article-title>
          . Idea Group (
          <year>2005</year>
          ), ISBN r-
          <volume>59140</volume>
          -426-6.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3 .
          <string-name>
            <surname>Booch</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rumbaugh</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobson</surname>
            ,
            <given-names>L</given-names>
          </string-name>
          :
          <string-name>
            <surname>Unified Modeling Language User Guide. Addison-Wesley</surname>
          </string-name>
          (
          <year>1999</year>
          ),
          <source>ISBN 0-201-57168-1</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4 .
          <string-name>
            <surname>Endrci</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , et al.:
          <article-title>Patterns: Scrvice-Orientcd Architccture</article-title>
          and
          <string-name>
            <given-names>Web</given-names>
            <surname>Services</surname>
          </string-name>
          .
          <source>IBM Redbooks</source>
          (
          <year>2004</year>
          ), ISBN 0-738-45317-X. Also available at URL: http : / /vuut. redbooks . ibn. coro,/redbooks/pdf s/ sg246303.pdf (
          <year>February 2006</year>
          )
          <article-title>rr</article-title>
          . Erl,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Service-Oriented Architecture: Concepts, Technology, and</article-title>
          <string-name>
            <surname>Design. Prentice Hall PTR</surname>
          </string-name>
          (
          <year>2005</year>
          ),
          <source>ISBN 0-13-185858-0</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          6 .
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          et al.:
          <article-title>Design Patterns: Elemcnts of Rcusablc Object-Oriented Software</article-title>
          .
          <source>Addison-Weslcy Profcssional Computing Series</source>
          (
          <year>1995</year>
          ), ISBN-
          <volume>10</volume>
          :
          <fpage>0201633612</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          7 Heckel,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Lohmann</surname>
          </string-name>
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Thone</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Towards a UML Profile for Service-Oriented Architecturcs</article-title>
          . Documcnt is availablc on URL ttp: / / citeseer. ist . psu.
          <source>edu/heckel03towards .html (April</source>
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          8 .
          <string-name>
            <surname>Jacobson</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Object-oriented software enginecring, A Use-Case Driven Approach</article-title>
          . ACM Prcss (
          <year>1992</year>
          ),
          <source>ISBN 0-201-54435-0</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          9 .
          <string-name>
            <surname>Johnston</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>IIML 2.0 Profilc for Software Services</article-title>
          .
          <article-title>Docurnent is availablc orr URL http</article-title>
          : / / vlr:;
          <article-title>-r I28. ibn</article-title>
          . con/developerworks /rat ional/ l-ibr ary / 05/ 4I9- soa/ (
          <year>February 2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>1 0 . Unified Modelirrg Language - UML 2 Superstructure</article-title>
          . Docurnent is available on URL http: / /wvu. ong. orgltechnology/documents/formal/un1.htn (
          <year>February 2006</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>