Service Component Architecture (SCA) so far has largely gone unnoticed by developers of enterprise applications, even though there are already several SCA implementations on the market. Additionally, open-source SCA implementation from Apache called Tuscany is gaining momentum.
I suspect that most developers think of SCA as yet another “enterprisey” SOA-related standard along the lines of the mostly obscure WS-* specifications. The fact that SCA is being developed by a vendor consortium as opposed to a grass-root open source effort does not add to its popularity either.
However, SOA and Web services are not the main focus of SCA. SCA is a generic component/application framework that is totally separate from Web services. SCA allows defining component interfaces and implementations in Java (although WSDL interfaces are supported as well). I would actually speculate that Java interfaces are going to be used in the majority of cases (at least, for Java applications) and WSDL will be left to special circumstances.
SCA also supports remoting by allowing to expose component interfaces using Web services or other technologies, such as JMS (using so-called “bindings”). But this capability is secondary to the SCA assembly model that explains how components are defined and composed.
The bottom line is that it is perfectly valid to use SCA without ever creating a single Web service.
Moreover, SCA directly competes with Spring and other application and IOC frameworks. SCA’s component is very similar to Spring’s bean. SCA components can have properties and references. References can be “wired” to other components. Similarly to Spring, references and properties translate into setters or constructors that are populated via injection mechanism. SCA 1.0 even supports component auto-wiring that matches auto-wiring Spring feature.
SCA does support Spring via Spring Component Implementation specification, which allows to define SCA components using beans defined in a Spring’s context file. However, for brand new SCA applications, there is really no need to use any other IOC container in addition to SCA itself (in fact, I would argue that using multiple component/IOC frameworks in the same application may make the application architecture really confusing). Of course, Spring does much more than just providing IOC functions (e.g., AOP, integration with persistence frameworks, MVC support) and so these other Spring capabilities could provide sufficient rationale for deciding to use Spring in conjunction with SCA. But given that SCA will be integrated with many commercial products (IBM has already started down that path with adding SCA to the WebSphere application server) including development tools support, I can see how SCA could become a very substantial alternative to Spring.
SCA also directly competes with Java EE. This can be illustrated by the following diagram which is part of the documentation provided with WebSphere SOA Feature Pack:
Indeed, SCA bindings insulate developers from specific communication protocols and mechanism so they don’t have to deal directly with Web services and JMS. On the Web services side, it is not entirely clear to me at this point how SCA is going to be able to support all the capabilities currently provided by JAX-WS, such as “bare” and “wrapped” styles, JAXB serialization and others but I guess it could be possible in theory.
SCA policy framework allows to declaratively specify various policies for SCA components. Currently the policies mostly focus on reliable messaging and security. In theory, they could also include defining transaction boundaries similar to EJB’s transaction attributes.
Another common misconception about SCA is that it must to be used together with Service Data Objects (SDO). This is not the case. While SCA recommends using SDOs, regular Java classes and simple types are supported as well.
SCA also has a number of unique benefits, the most prominent one being its support for different languages. There are SCA implementations for C++ and PHP; Apache Tuscany supports Ruby, Groovy and JSR 223 component implementations (what’s interesting, component interfaces still have to be defined in Java or WSDL).
Binging flexibility is another interesting SCA feature. Today we have to use completely different APIs and libraries for different ways of inter-system communication, e.g., JAX-WS has very little in common with XML over JMS. SCA supports a uniformed declarative binding abstraction so that developers don’t have to be concerned with the intricacies of the specific communication type. New protocols and data formats can be added. For example Tuscany is going to support JSON as one of the bindings. One can imagine that REST or even COBOL Copybook format can be added in the future.
I’m somewhat concerned that SCA binding is actually a combination of a data format and a transport protocol. So, for example, JMS binding translates into XML transported using JMS text message with certain headers. So it is not clear to me if JMS binding can support other data formats (e.g., positional string) over JMS. Perhaps this is something that can be clarified in the future versions of the spec.
So is SCA going to win over hearts and minds of developers and become the de-facto standard for enterprise applications (and not just the ones with heavy Web services aspect)? That remains to be seen. I’ll be watching closely how it evolves, especially the Tuscany project which at this point is still in the incubation stage.