2008-08-14

What is SCA in simple words ?

There's so many papers, articles and blogs about SCA that I'm not gonna write thirty pages about it.

I just to want to share what I understood from that norm and help people to quickly figure out what it's all about.

SCA

Let's start from the beginning : SCA stands for Service Component Architecture or architecture based on components, and each of them provides a service.

According to Wikipedia :

On March 21, 2007 the OSOA Collaboration released the V1.0 level of specification [3].

The specifications specify that an application designed with SCA should have the following advantages:

  • Decoupling of application business logic from the details of its invoked service calls including .
  • Target services in a multitude of languages including C++, Java, COBOL, and PHP as well as XML, BPEL, and XSLT.
  • The ability to seamlessly work with various communications constructs including One-Way, Asynchronous, Call-Return, and Notification.
  • The ability to "bind" to legacy components or services, accessed normally by technologies such as Web Services, EJB, JMS, JCA, RMI, RPC, CORBA and others.
  • The ability to declare (outside of business logic) the Quality of Service requirements, such as Security, Transactions and the use of Reliable Messaging.
  • Data could be represented in Service Data Objects.

The value proposition of SCA, therefore, is to offer the flexibility for true composite applications, flexibly incorporating reusable components in an SOA programming style.

The overhead of business logic programmer concerns regarding platforms, infrastructure, plumbing, policies and protocols are removed, enabling a high degree of programmer productivity

SOA

You know, SOA, or Service Oriented Architecture ! That is to say, instead of having all the objects responsible for their behavior, each and every object has a limited role,

seen as a service.

Just imagine your normal application which does everything from security to retrieving business data, is split into services.

One of the key advantages of that is that you can reuse your services through all your applications.

And when, for instance, your security policy changes, you only have one component to migrate, not all applications.

That's a simple example (explained in a simple way with simple words) of what SOA offers.

Composite pattern

Let's turn back to SCA. SCA is a norm which uses the composite pattern, that is to say the use and aggregation of different parts to build a much more complex part.

A composite is not a piece of code but just a configuration of several other services which all together brings a vision of another service.

It is often compared, in term of concept, to Spring, the Java EE framework because Spring uses injection and makes the connection between all the beans to offer a global service.

Simple Example based on POJOs (taken from BEA examples, based on fabric3 implementation) :

 

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           xmlns:f3="http://fabric3.org/xmlns/sca/2.0-alpha"
           name="simple">
    <component name="Loan-pojo">
        <implementation.java class="example.pojo.LoanServiceImpl"/>
        <property name="baseCreditScore">650</property>
        <property name="interestRate">5</property>
    </component>
    <component name="Insurance-pojo">
       <implementation.java class="example.pojo.InsuranceServiceImpl"/>
    </component>
    <component name="Dealer-pojo">
       <implementation.java class="example.pojo.AutoDealerImpl"/>
       <reference name="loan" target="Loan-pojo"/>
       <reference name="insurance" target="Insurance-pojo"/>
       <service name="AutoDealer"/>
    </component>
    <service name="dealer-pojo" promote="Dealer-pojo/AutoDealer">
      <binding.rmi name="dealer" serviceName="autoDealerService"/>
    </service>
</composite>

 

Well now, you know enough to be able to read all the other articles on the Net !

 

I stil would advise you to go on the fabric3 website (implementation chosen by BEA) and on the Apache Tuscany project.

A recommended PDF about SCA http://www.davidchappell.com/articles/Introducing_SCA.pdf

Oracle will have its own SCA implementation, but unfortunately I can't say more since I'm not a BEA employee anymore but not yet an Oracle employee :)

 

Hope I helped you to get a basis on that topic :)

 

Mots clés Technorati : ,,

No comments: