First, why should Middleware
The rapid development of computer technology. From the look of hardware technology, CPU speed increasing, more and more processing power; from the software technology, applications have been expanding, especially the Internet and the WWW, so that the computer a broader range of applications, many applications To be in the process of the heterogeneous network environment running on the platform. All of the new generation of software development put forward new demands. In such a distributed heterogeneous environment, there is usually a variety of hardware platforms (such as PC, workstations, minicomputers, and so on), these hardware platforms and a variety of software systems (such as different operating systems, databases, Language compiler, etc.), as well as a variety of different styles of the user interface, the hardware platform may also use different network protocols and network architecture to connect. How to integrate these systems and the development of new applications is a very real and difficult problems.
Second, what is middleware
To address the problem of heterogeneous distribution, it is proposed middleware (middleware) concept. Middleware platform is located (hardware and operating systems) and applications between the general services, as shown in Figure 1, these services have a standard interface and protocol procedures. For different operating systems and hardware platforms, which can interface with the norms and agreements to realize a wide range.

Figure 1 middleware
May find it difficult to give a strict definition of middleware, the middleware should have the following features:
To meet the needs of a large number of applications
Running on a variety of hardware and OS platform
Support for distributed computing, providing inter-network, hardware and OS platform of transparency or the application of interactive services
To support the standard protocol
To support the standard interface
As the standard interface for portability and interoperability standards for the agreement of the importance of a number of middleware has become a major part of the standardization work. For application development, middleware, operating systems and network services far more important, the middleware provided by the API defines a relatively stable environment for high-level applications, regardless of the underlying computer hardware and system software how to replace old ones, as long as the middleware Update to upgrade and maintain the middleware definition of the same external interface, applications almost without any changes, so as to protect the enterprise in application development and maintenance of major investment.
Third, the classification of the major middleware
Middleware included in the wide range of issues, for demand for different applications have emerged in a variety of middleware products with their own characteristics. But so far there is no middleware more precise definition, therefore, in a different point of view or a different level, the classification of middleware will be different. As the need to shield the distribution of middleware environment of heterogeneous operating systems and network protocols, it must be able to provide distribution services, environment, communications, we will call such a communication service platform. Based on the realization of the objectives and mechanisms of different platforms and we will be divided into the following major categories:
Remote Procedure Call (Remote Procedure Call)
Message-oriented middleware (Message-Oriented Middleware)
ORB (Object Request Brokers)
They can be up to provide various forms of communications services, including synchronization, queuing, subscription publication, broadcasting and so on, these basic communication platform, to build a variety of framework for applications in different areas of services such as transaction processing Monitors, the distribution of data access, object transaction manager such as the OTM. Application of the upper platform for shielding the heterogeneous platform differences on the definition of the framework and the corresponding applications in the field of architecture, standards of service, and other components, the user can tell concerned about the framework of the incident, and then provided to deal with these The event code. When the time of the incident, the framework will call the user's code. Users do not have to call code framework, the user need not concern procedure framework, the implementation process, system-level API call, and so on, all of which is responsible for the completion of the framework. As a result, based middleware applications developed has a good scalability, manageability, high availability and portability.
Now, for some of the major middleware were to be brief.
1, remote procedure call
Remote Procedure Call is a widely used method of distributed applications. An application to use the RPC "remote" at a different address space in the process and results from the point of view and implementation of the same local call. In fact, an RPC application is divided into two parts: server and client. server to provide one or more of the remote procedure; client to the server to issue long-distance calls. client and server can be located on the same computer can also be located in different computers, or even on different operating systems run on. They communicate through the Internet. The stub and provide support for the operation of data transfer and communications services, thus shielding the different operating systems and network protocols. Here is the synchronization of the RPC communications. Thread can be used for asynchronous calls.
In the RPC model, client and server as long as a corresponding RPC interface, and has run the RPC support, we can fulfill the interoperability, and do not have to be restricted to a specific server. Therefore, RPC for client / server distributed computing has provided strong support. At the same time, RPC remote procedure call provided by the service process is based on the visit, client and the server to connect directly, without intermediaries to deal with the request, it also has some limitations. For example, RPC is usually required to locate some of the details of the network server; in the client's request at the same time, the server must be requested activities and so on.
2, message-oriented middleware
MOM refers to the use of highly efficient and reliable messaging platform-independent mechanism for the exchange of data and data-based communications for distributed systems integration. By providing news and information delivery model line up, it can be distributed in the environment to expand inter-process communication and multi-protocol, language, applications, hardware and software platform. MOM popular IBM's middleware products MQSeries, BEA's MessageQ, and so on. Messaging and queuing technology has three main features:
Communications program can be run at different times: network program is not directly call each other, but indirectly into the news message queue, because there is no direct inter-process. At the same time, so they do not have to run. Add the appropriate message queue, the goal of the procedure is even no need to run; even if the goal of the program to run, nor does it mean to immediately deal with the news.
The structure of the application is not binding: in complex applications, not only between the communication process can be one-on-one relationship, but also to conduct one-to-many and many-to-one way, or even a combination of the above in a variety of ways. Construction of a variety of means of communication does not increase the complexity of the application.
Procedures and complex network of phase separation:
Add news program message queue or removed from the message queue information to communicate with all the associated activities, such as the maintenance of message queue, maintenance procedures and the relationship between the queue to deal with the network to restart the network and mobile news MOM, and so is the task does not talk directly with other procedures, and they do not touch on the complexity of the communications network.
3, Object Request Broker
With the object technology and distributed computing technology, the two combined to form a distributed object computing and software technology development for today's mainstream direction. By the end of 1990, the Object Management Group OMG Object Management introduced for the first time the structure of OMA (Object Management Architecture), ORB (Object Request Broker) is the core component of this model. Its role is to provide a framework for communication, transparency in the distribution of heterogeneous computing environments transfer request object. CORBA specification includes all the standard interface ORB. In 1991 introduced the definition of CORBA 1.1 interface description language OMG IDL and support Client / Server object in a specific ORB on interoperability of the API. CORBA 2.0 specification is described by different vendors to provide the interoperability between the ORB.
Object request broker (ORB) is the object bus, which in CORBA specification at the core of the definition of heterogeneous environment in a transparent object to send and receive requests to respond to the basic mechanism is set up between the target client / server middleware relations. ORB objects can be made transparent to the other object request to accept or respond to other objects, these objects can also be located at the local long-range machine. ORB requests to intercept calls and can be found responsible for the realization of the object of the request, transmission parameters, call the appropriate way to return the results. client was not aware of the object with the object server communications, storage or server object activation mechanism, there is no need to know where the object server, which is what the language, the use of what operating system or other objects do not belong to the interface of the system components.
It is worth noting that the role of client and the server is used to coordinate the interaction between objects, in accordance with the appropriate occasions, ORB, the object can be client, it could be a server, or both between the two. When the target to send a request, it is the role of a client; when it received the request, the server role in it. Most of the objects are not only playing the role of client and server to play a role. Also due to the ORB Object Request responsible for the transmission and server management, client and server are not directly connected, supported by the RPC with a simple Client / Server structure in comparison, ORB can support a more complex structure.
4, transaction processing monitor
Transaction processing monitor (Transaction processing monitors) first appeared in the mainframe, to provide support for large-scale transaction processing and reliable environment to run. With the distributed computing technology, distribution systems for large-scale application of the proposed transaction processing needs, such as commercial activities in a large number of key transactions. Transaction processing monitor in the sector between the client and server, transaction management and coordination, load balancing, such as failure to restore order to improve overall system performance. It can be seen as transaction processing application "operating system." On the whole, transaction processing monitor have the following features:
Process management, including the server to start the process of distribution of its mandate to monitor its implementation and load balancing.
Service management, to ensure that in its monitoring of the transaction atomicity, consistency, independence and sustainability.
Communications management between the client and the server provides a wide range of communications mechanisms, including in response to the request, session, line up subscribers, and other publishing and broadcasting.
Transaction processing monitor for a large number of client service, such as aircraft will be counting system. If the server for each client they need to have the allocation of resources, it will be overwhelmed server (shown in Figure 2). In practice, however, not all at the same time the client needs to request service, and if a client requests a service that want quick response. Transaction processing monitor in the operating system to provide a service to the client request to manage its distribution services to the process server in the system of limited resources efficiently to large-scale customers.

Figure 2 transaction processing monitor
Fourth, some of the problems faced by
Middleware and network operating system to shield the agreement of the differences, in order to provide a wide range of applications, communications mechanism; and provide the appropriate platform to meet the needs of different areas. As a result, middleware applications for a relatively stable environment for high-level applications. However, the middleware service is not "a panacea." Middleware to be followed by a number of principles from the actual distance is still great. Most popular services, using proprietary middleware API's proprietary protocol and make application to the establishment of a single manufacturer's products from different manufacturers is difficult to achieve interoperability. Some just want to provide some services middleware platform in order to limit the application of heterogeneous systems transplantation. Application developers of these services on their own middleware applications also need to bear considerable risks, with the technology they often need to rewrite their systems. Despite the middleware services to improve the calculation of the distribution of the degree of abstraction, application development, but they should also face a number of difficult design choices, for example, developers need to be applied to determine the distribution of client and server side of the distribution function. Services that normally would be on the client to facilitate the use of display devices, data services will be on the database server in order to close, but it is not always the case, let alone how to allocate the other functions of the application is not easy to determine the