1. Overview
SCA (Service Component architecture) is a simple model specification for developing SOA (service-oriented architecture) service-oriented applications, which describes the models used to build applications and systems using SOA. It simplifies application development and implementation work with SOA. SCA is just a specification (http://www.osoa.org), and the implementations of each of the companies involved in SOA technology are different. This article mainly analyzes the SCA design architecture in the Apache Tuscany Open Source project (http://incubator.apache.org/tuscany/), because we cannot be satisfied with the use of, and from the works of these masters to draw nourishment, know it, but also to know the reason why , when we have the same language skills in the face of requirements (such as SCA specifications), how to design an open, scalable architecture is a challenge. Because Tuscany design philosophy is profound, open structure thinking, performance considerations, security considerations, and so on, so it is not possible in a short article in detail, will be in the subsequent article in-depth analysis, extraction design structure and design skills of the essence, for the vast number of software industry colleagues to share.
2. Basic knowledge of SCA specification
The SCA programming model is highly extensible and language neutral, and it is easy to be extended to various implementations of language technology java,c++,bpel,php, spring, and many other remote access bindings including Web SERVICE,JMS, Ejb,json RPC, etc. A variety of host environments such as TOMCAT,JETTY,GERONIMO,OSGI. SCA-delimited architecture enables developers to focus more on business logic without having to focus on system attributes such as reliability, security, and transactions, which are all configured in a configuration file. The components of SCA are shown in the following illustration: (The SCA terminology involved in this article is not translated)
Figure 1
(1) Component
The dark blue squares (Component A and Component B) indicate Component. Component is an SCA atom (the most basic organizational unit) that encapsulates the actual business logic. Component can be implemented using any programming technology supported by the operating environment. For example, the Apache Tuscany project currently supports Java, JavaScript, Ruby, Python, and C + + component types and provides an extension API for creating new component types.
(2) Property
Property (yellow squares above Component A and Component B and yellow small squares of composite a). property controls the behavior of component, which can be changed during deployment. At the same time composite can also have property, but its property is Component property Upgrade (Promote) after the property.
(3) Service
Service is used for other component calls. In the diagram, the interface is represented by the Green Arrow to the left of the component box, known as the SCA "service".
(4) Reference
Component also describes the interface of other components called by the component, which are represented by the pink arrows to the right of the component box, called the SCA "Reference" (Reference). These service and reference are connected together to form a system that can be run.
(5) Composite
If component is an atom in the SCA architecture, then composite is the molecule in the SCA architecture; the two component,a and B in the figure are assembled in a larger composite range, called composite A. The SCA Composite describes a set of interconnected component. As you can see, composite also declares service and reference, which are exposed to composite outside. Composite's service and reference are composite internal component service and reference upgrades. A composite internal component is connected to each other just as it creates a tightly coupled application running in the same process. By connecting the composite through the service and the reference, a more loosely coupled system is formed; each composite in the system may run in a separate process or processor, connected through various protocols and transport bindings across the network. In this way SCA provides a unified programming model for independent and distributed applications.