Software Architecture Middleware Technology

Definition of middleware

In fact, middleware is a kind of component. It is an independent system software or service program that can help distributed application software share resources between different technologies.

We characterize it as a type of system software, such as the message middleware we often say, database middleware, etc., are all manifestations of middleware. The general situation is to provide services to the application system, rather than directly facing customers.
insert image description here

What are the characteristics of middleware?

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.

Provide the interoperability mechanism between different services of the application layer, as well as the connection and control mechanism between the application layer and the database.

Provide a platform for application development and operation of multi-layer architecture, as well as an application development framework, and support modular application development.

Mask differences in hardware, operating systems, networks, and databases

Provide application load balancing and high availability, security mechanisms and management functions, and transaction management mechanisms to ensure transaction consistency.

Provide a common set of services to perform different functions, avoid duplication of work, and enable applications to cooperate with each other.

What are the advantages of middleware?

Requirements-oriented
, that is, designers focus on the business logic itself

Because the docking work you do can be implemented by middleware, so that you have more time to focus on business logic

For example, when communicating remotely between systems, when using message middleware for transfer, I don't have to think about how to communicate, how to implement some logic at the bottom layer, how to develop protocols, and how to ensure security.

Business separation and inclusion

Application developers can divide functions according to different businesses, reflected in different interfaces or interactive services

Design and Implementation Separation

Components function externally or interact with components 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.

Isolate complex system resources

A very important function of architecture is to isolate system resources from application components, which ensures component reusability, and even the basis of "plug and play", which is consistent with the intent of middleware.

Standards-compliant interaction model

Middleware implements the architectural model and implements standard protocols

software reuse

Middleware provides mechanisms such as component encapsulation, interaction rules, and isolation from the environment, all of which provide convenient solutions for software reuse.

Provides management of application components

Middleware-based software can be easily managed, because components can always be divided by identification mechanism

Corba (Common Object Request Broker Architecture)

Corba is a remote invocation mechanism, which is called a mechanism of public object proxy request. The basic idea of ​​this mechanism is shown in the figure below:
insert image description here
For example, we often have this kind of demand, that is, there are clients and servers in the entire structure. Some function blocks are actually implemented on the server side, but to implement this function on the client side, when you directly call the remote function block, you will face a series of problems such as network problems, how to perform specific operations when calling, and so on. A technology such as middleware technology was born as the times require. It builds a proxy object on the server side on the client side, so as to call the local proxy object to realize the call to the remote server side.

The basic idea of ​​the proxy mechanism is that there will be a reference to the server-side object (that is, a proxy) on the client side. Assuming that there is an object A on the server, then there is an object proxy on the client, which is the object A on the server. With A's proxy to the local, there is no need to consider the remote call problem, and the proxy object of A is directly called locally.

And the client passes the request through the local conversion mechanism, and then passes it to the remote server. After a series of analysis and interpretation, it connects to the server side, and then the server completes the execution, returns back, and finally returns to the client.

This is the same principle as RMI, yes, it is the same principle. In Corba, some objects are also involved, and the meaning of these objects is explained as follows:

Servant (Servant): The real implementation of the Corba object, responsible for completing client requests. That is the real business logic section.

Object Adapter (Object Adapter, POA): It is used to shield the implementation details of the ORB core and provide an abstract interface for implementers of server objects so that they can use certain functions inside the ORB. Pass the request over and perform the work of interface conversion.

Object Request Broker (ORB): 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 side does not need to know the location, communication method, implementation, activation or storage mechanism of the service object.

From another point of view, the role of the middle ORB is to connect all parties, similar to a bus object.
insert image description here
Object Request Broker (ORB)

Responsible objects transparently send and receive 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.

Object Services

A collection of basic objects provided for the use and implementation of services that should be independent of the application domain.

Common Facilities

Provide end users with a set of shared service interfaces, such as system management, combined documents and e-mail, etc.

Application Interfaces

Products provided by vendors whose interfaces can be controlled correspond to the traditional application layer identification and are at the highest level of the reference model.

Domain Interfaces

Interfaces provided for application domain services, such as the specifications customized by the OMG organization for the PDM system.

summary

In fact, what we mainly understand is the concept of middleware, and the ideological principle of middleware is to use proxy objects to access objects on the server side. Invoking the remote is like calling the local, that is, we reduce a lot of docking work, because the middleware does it for us. But to learn this matter, we still have to experience it ourselves, there is no end to learning, keep going!

Guess you like

Origin blog.csdn.net/java_cjkl/article/details/130422518