java – Advantages of SCA over Spring?

java – Advantages of SCA over Spring?

Im not the most knowledgeable about Spring, but am pretty familiar with SCA from having worked with it in IBMs WebSphere Integration Developer IDE and the environments it deploys to: WebSphere Enterprise Service Bus and WebSphere Process Server.

It really all has to do with abstraction and the thought of allowing developers to focus on what is most important – business logic. We are all familiar with the concept of Object-Oriented Programming and how that abstraction better represents the real world. Then along comes web services and the service-oriented architecture approach. Web services further abstract our logic by making it less dependent on what language is behind our logic. Now C++ or .Net or Java or even RPG or COBOL or whatever could be behind our web service. We can get languages and systems to talk to each other in a way that doesnt depend on CORBA and libraries and what not.

SCA (Service Component Architecture) attempts to take SOA to the next level. It attempts to abstract the protocol and address used to talk to another system or service. Heres the why: With working with web services, you as a developer still need to work with protocol and write or hook in a LOT of boilerplate code. You have to know if you are http or https. You have to know if you are (in the Java world) JAX-RPC, JAX-WS 2.0, JAX-WS 2.1, JAX-WS 2.2 or even JAX-RS (REST based). You need to know if you are working with JSON, XML, or SOAP and if SOAP, is it 1.0, 1.1, or 1.2? And sometimes you even have to know how the vendor of your application server implements certain things (you shouldnt, but it can be the case). And then what happens if you want your web service to talk to another service. But that second service happens to be messaging based. Does that mean JMS? MQ? JMS over MQ? other? And what about just pure HTTP POST and GET?

This is where SCA comes in. SCA attempts to abstract the end points of your services and hide the protocol implementation from you the developer. When you need a service you just look it up via the SCA APIs and then invoke the service (I think the method is execute? At least it is in IBMs extension of SCA). But anyway….Now you do not have to know that the service you are communicating with is JAX-WS 2.1 or REST or even MQ. You dont have to know that you working with SOAP/HTTP or JSON/XML or SOAP/JMS or whatever. SCA hides this all from you. It allows you to connect services of differing implementations to each other so they can all talk to one another via a common service interface.

As you can imagine, this is another layer of abstraction and technology on top of existing abstracted technologies. But having seen it myself, I believe it is worth looking into. I know IBM and Apache (and I think others that just dont come to mind at the moment) worked on coming up with the SCA standard. (And actually IBMs version of SCA is now built on the open standard that Apache presented. Hopefully other vendors that support SCA do the same.)

I think it is worth taking the time to look at. It can help you to focus not so much on the integration of services based on their protocols, but rather the business logic of the services, which is really the value they bring to the table.

SCA is being standardized through OASIS (Assembly Specification), so you can chose from different implementations (e.g. Apache Tuscany or Fabric3).

SCA defines applications in terms of the following basic building blocks:

  • interface: defines available operations
  • component: describes an implementation artifact in terms of which services it offers, which references it requires, and which configurable properties it exposes
  • binding: declares the communication protocol used by a service or reference
  • policy: captures non-functional requirements for services, references, or implementations

To build SOA applications, concrete types of these entities are assembled into composites. For example:

  • interface: WSDL port type, Java interface
  • component implementation: Java class, BPEL process, Python, Spring
  • binding: JMS, Web Service, RMI/IIOP
  • policy: transaction, security

In addition, SCA defines unified client APIs to invoke components both synchronously and asynchronously (including one-way). For Java this includes annotation-based reference injection.

Combining these capabilities enables you to easily create distributed applications from heterogeneous technologies and evolve them by adding or swapping binding, implementation, interface, or policy technologies.

java – Advantages of SCA over Spring?

It is worth looking at Spring Integration ( as opposed to basic Spring when comparing to SCA, since Spring Integration offers a very nice framework for transparently wiring together remote components.

Leave a Reply

Your email address will not be published. Required fields are marked *