Advanced skills in system architecture design·Component and middleware technology

Click to enter the series of articles directory

现在的一切都是为将来的梦想编织翅膀,让梦想在现实中展翅高飞。
Now everything is for the future of dream weaving wings, let the dream fly in reality.

Insert image description here

1. Definition of components

Definition 1: A software component is an assembly unit that has a standardized interface specification and explicit context dependencies. Software components can be deployed independently and assembled at will by third parties.
Definition 2: A component is a valuable, almost independent and replaceable part of a system that fulfills a clear function within a well-defined architectural context.
Definition 3: A component is an independently published functional part whose services can be accessed through its interface.

An artifact is a set of atomic components that typically need to be deployed simultaneously.

The difference between components and atomic components is that most atomic components are never deployed individually, although they can be deployed individually. In contrast, most atomic components belong to a component family, and a deployment often involves the entire family.

An atomic component is a module and a set of resources.
Atomic components are the basic unit of deployment, version control, and replacement. Atomic components are usually deployed in groups, but they can also be deployed individually. A module is an atomic component with no separate resources (under this strict definition, a Java package is not a module - the atomic unit of deployment in Java is a class file. A single package is compiled into multiple separate class files - each common Each class has one).

A module is a set of classes and possibly non-object-oriented structures such as procedures or functions.

The difference between modules, objects and components:

The characteristics of components are: (1) independent deployment unit; (2) assembly unit as a third party; (3) no (external) visible state. (You can use a container to manage its external visible state)
A component can contain multiple class elements, but a class element can only belong to one component. Splitting a class apart for deployment usually doesn't make sense.
The characteristics of the object are: (1) An instance unit with a unique identifier. (2) It may have a state, which is visible externally. (3) Encapsulates its own status and
behavior.

Please add image description

2. Component system architecture characteristics

The component system architecture consists of a set of platform decisions, a set of component frameworks, and the design of interoperability between component frameworks.

A component framework is a dedicated architecture (usually around some key mechanisms) and a set of strategies that act fixedly on component-level mechanisms.

The interoperability design of the conceptual framework includes the rules for interoperability between all frameworks connected by the system architecture .

A component is a set of atomic components that usually need to be deployed at the same time. The difference between components and atomic components is that most atomic components are never deployed individually, although they can be deployed individually.

An atomic component is a module and a set of resources.

A module is a set of classes and possibly non-object-oriented structures, such as procedures or functions.

A resource is a fixed collection of typed items.

The concept of resources can include code resources, and thus modules. The problem is that in addition to the resources generated by the compiler when compiling a module or package, there may be other resources. In the "pure object" approach, resources are external immutable objects - immutable because components have no persistence flags and copies cannot be distinguished.

If a software system is regarded as a collection of components, then from the perspective of the external form of the components, the components that constitute a system can be divided into [five categories]:

(1) Independent and mature components. Independent and mature components have been tested many times in the actual operating environment. This type of component hides all interfaces and users only need to use prescribed commands. For example, database management systems and operating systems, etc.
(2) Restricted components. Restricted components provide interfaces and point out the conditions and prerequisites for use. This type of component will have resource conflicts, coverage and other effects when assembled, and needs to be tested when used. For example, basic class libraries in various object-oriented programming languages.
(3) Adaptable components. Adaptable components are packaged or use interface technology to handle incompatibility, resource conflicts, etc., and can be used directly. This component can be used without modification in a variety of environments. For example ActiveX etc.
(4) Assembly components. When the components of assembly are installed, they have been assembled at different levels of the operating system, database management system or information system, and can be connected and used using glue code. Most software products currently provided by some software vendors fall into this category.
(5) Modifiable components. Modifiable components can be replaced with versions. If errors are modified or new functions are added to the original component, the component can be replaced by re-packaging or writing an interface. This kind of component is used frequently in application system development.

3. Overview of middleware

Middleware is an independent system software or service program that can help distributed application software share resources between different technologies. Middleware can:
1. Responsible for the connection and communication between the client and the server, as well as the efficient communication mechanism between the client and the application layer.
2. Provide application load balancing and high availability, security mechanisms and management functions, as well as transaction management mechanisms to ensure transaction consistency.
3. Provide the interoperability mechanism between different services in the application layer, as well as the connection and control mechanism between the application layer and the database.
4. Provide a multi-layer architecture application development and operation platform, as well as an application development framework to support modular application development.
5. Shield the differences in hardware, operating systems, networks and databases.
6. Provide a set of common services to perform different functions to avoid duplication of work and enable collaboration between applications.
Middleware is a type of component.
Middleware is a type of system software.
Insert image description here

Simplify the structure, shield differences, and facilitate reuse.

Advantages of using middleware technology:

  • (1) Demand-oriented. That is, designers focus on the business logic itself.
  • (2) Separation and inclusiveness of business. Application developers can divide functions according to different businesses, which are reflected in different interfaces or interaction modes.
  • (3) Design and implementation isolation. The external effects of components or the interactions between components are all carried out through interfaces. Component users only need to know the interface of the component and do not need to care about its internal implementation. This is the key to the separation of design and implementation.
  • (4) Isolate complex system resources. A very important function of the architecture is to isolate system resources from application components. This is the basis for ensuring that components can be reused or even "plug and play", which is consistent with the intention of middleware.
  • (5) Standard-compliant interaction model. Middleware implements the architectural model and implements standard protocols.
  • (7) Software reuse. Middleware provides components encapsulation, interaction rules, isolation from the environment and other mechanisms, which provide convenient solutions for software reuse.
  • (8) Provide management of application components. Middleware-based software can be easily managed because components can always be divided through identification mechanisms.

4. CBSD component-based model (component assembly model/component-based software development)

A component (Component) is a software unit with reusable value and relatively independent functions. The Component-Based Software Development (CBSD) model uses modularization methods to modularize the entire system, and with the support of a certain component model, reuses one or more software components in the component library through combination means. The process of constructing application software systems with high efficiency and high quality.

The component-based development model incorporates many characteristics of the spiral model, is evolutionary in nature, and the development process is iterative. The component-based development model consists of five stages: software requirement analysis and definition, architecture design, component library establishment (the component library includes component acquisition and component management), application software construction, testing and release . As shown in the picture:

Insert image description here

CBSE components should have the following characteristics:

  • Assemblability: All external interactions must occur through publicly defined interfaces.
  • Deployability: Components are always in binary form and can run on the platform as an independent entity.
  • Documentation: Users judge whether the component meets the requirements based on the documentation.
  • Independence: Can be assembled and deployed without other special components.
  • Standardization: A component model that conforms to a certain standard.

Assembly sequence of CBSE components:

  • Sequential assembly: Call existing components in sequence. You can use two existing components to create a new component.
  • Hierarchical assembly: The "provided" interface of the called component must be compatible with the "request" interface of the calling component.
  • Overlay assembly: Multiple components are merged to form a new component. The new component integrates the functions of the original components and provides new interfaces to the outside world.

As an important software technology and tool, components have been greatly developed. These new technology standards and tools include Microsoft's DCOM/COM, Sun's EJB, OMG's CORBA, etc. Component-based development activities start with identifying candidate components . By searching the existing component library , confirm whether the required component already exists. If it already exists , extract it from the component library for reuse ; if it does not exist , use the object-oriented method. Develop it. After the extracted components pass syntax and semantic checks, these components are assembled together through glue code to implement the system. This process is iterative.

The component-based development method makes software development no longer start from scratch. The development process is the process of component assembly, and the maintenance process is the process of component upgrade, replacement and expansion. Its advantage is that the component assembly model leads to software reuse and improves Improves the efficiency of software development ; components can be defined by one party, implemented by another party, and then provided to a third party for use; the component assembly model allows multiple projects to be developed simultaneously, reducing costs, improving maintainability, and enabling step-by-step submission Software Products.
The disadvantage is that due to the use of customized assembly structure standards, there is a lack of universal assembly structure standards , and the introduction is risky; reusability and software efficiency are not easy to coordinate, requiring capable and experienced analysts and developers. Generally, If developers are unable to get involved, customer satisfaction is low; too much reliance is placed on components, and the quality of the component library affects product quality .

Component assembly refers to connecting the components in the component library to each other after appropriate modifications, or connecting them to the component elements in the current development project, and finally forming a new target software.

Component assembly technology can be roughly divided into function-based assembly technology, data-based assembly technology and object-oriented assembly technology.

5. Reuse of components

The levels correspond to different tasks in the component assembly process.
Dimensions of reuse
Horizontal reuse: universal regardless of industry field.
Vertical reuse: divided into industry areas and dedicated.
Insert image description here

5.1 Retrieval and extraction of components

Existing component classification methods can be divided into three major categories, namely keyword classification, facet classification and hypertext organization methods.

  • Keyword classification: It is the simplest method of organizing component libraries. Its basic idea is: according to the results of domain analysis, the concepts of the application field are decomposed into tree or directed acyclic graph structures in order from abstract to concrete. . Each concept is represented by a descriptive keyword. A non-decomposable atomic key contains certain building blocks belonging to it.

  • Facet classification method: In the facet classification mechanism, a number of "facets" (facets) used to describe the characteristics of components are defined. Each facet contains several concepts, and these concepts express the characteristics of the component on the surface. A description can describe the function a component performs, the data it operates on, the context in which the component is used, or any other characteristics.

  • Hypertext organization method: The hypertext organization method is different from the component library organization method based on database systems. It is based on full-text retrieval technology. The main idea is: all components must be supplemented by detailed function or behavior description documents; important concepts appearing in the description or Components are connected to each other in the form of network links; in the process of reading the document, the searcher can jump to documents containing related concepts or components according to human contact thinking; the full-text search system combines the keywords given by the user with the description document Match the text to achieve browse-style retrieval of components.

Insert image description here

5.2 Understand and evaluate components

Insert image description here

5.3 Modify components

Insert image description here

5.4 Assembling components

Insert image description here

System component assembly is divided into three different levels: Customization, Integration, and Extension. These three levels correspond to different tasks in the component assembly process.

6. Component standards

Insert image description here

7. Main middleware

Insert image description here
Insert image description here
Servant: The real implementation of the CORBA object, responsible for completing client requests.
Object Adapter: Used to shield the implementation details of the ORB kernel and provide an abstract interface for implementers of server objects so that they can use certain functions within the ORB.
Object Request Broker: Interprets the call and is responsible for finding the object that implements the request, passing parameters to the found object, and calling the method to return the result. The client does not need to know the location, communication method, implementation, activation or storage mechanism of the service object.
Insert image description here
The main contents of the CORBA system include the following parts:

  • (1) Object Request Broker (ORB). Responsible for objects transparently sending and receiving requests and responses in a distributed environment. It is the basis for building distributed object applications and realizing interoperability between applications in heterogeneous or homogeneous environments.
  • (2) Object Services. A collection of basic objects provided for using and implementing objects. These services should be independent of the application domain.
  • (3) Common Facili tites. Provides a set of shared service interfaces to end users, such as system management, combined documents, and email.
  • (4) Application Interfaces. Products provided by vendors that control their interfaces correspond to the traditional application layer representation and are at the top level of the reference model.
  • (5) Domain Interfaces. Interfaces provided for application domain services, such as specifications developed by the OMG organization for PDM systems.

Guess you like

Origin blog.csdn.net/weixin_30197685/article/details/132925466