First, message-oriented middleware overview
Message Queuing technology is a technique for exchanging information between distributed applications. Message queues can reside on memory or on disk, and queues store messages until they are read by the application. With Message Queuing, applications can be executed independently-they do not need to know each other's location, or they do not need to wait for the receiving program to receive this message before proceeding with execution.
In distributed computing environment, in order to integrate distributed applications, developers need to provide effective means of communication for distributed applications in heterogeneous network environments. In order to manage the information that needs to be shared, it is important to provide a public information exchange mechanism for the application.
The main methods of designing distributed application are: Remote Procedure call (PRC), one of the basic standard components of Distributed computing Environment (DCE); object transaction Monitoring (OTM)--The combination of object-oriented industry standard and transaction processing (TP) monitoring technology based on CORBA; Message Queuing ( MessageQueue)--a loosely coupled method for constructing distributed applications.
(a) Distributed computing environment/Remote Procedure Call (DCE/RPC)
RPC is a component of DCE, an application-integrated software standard released by the Open Software Foundation (OSF). RPC mimics the traditional programming method used by a program to refer to another program using a function reference, which is the form of a procedure call, and once invoked, the control of the program shifts to the invoked program.
In the case of an RPC implementation, the invoked procedure can reside and execute in another system, either locally or remotely. When the invoked program completes processing the input data, the result is returned to the calling program in the return variable of the procedure call. When RPC completes, the program is immediately returned to the calling program. Thus RPC mimics the call/return structure of a subroutine, which provides only synchronous data exchange between the client (the caller) and the server (the invoked procedure).
(b) Object Transaction monitoring (OTM)
Based on CORBA's combination of object-oriented industry standard and transaction processing (TP) monitoring technology, the CORBA specification defines the architecture of object-oriented technology and method, the common Client/server programming interface, and the guidelines for transmitting and translating data between multiple platforms. The development of the Distributed Application Interface language (IDL) and so on, and provides a broad and consistent pattern for the Client/server application of the structure distribution.
(c) Message Queuing (Messages queue)
The message team lists loosely coupled methods for constructing distributed applications that are implemented synchronously or asynchronously. The API call for Message Queuing is embedded in a new or existing application that provides an exchange of information via a message sent to memory or a disk-based queue or read from it. Message Queuing can be used in applications to perform a variety of functions, such as requesting services, exchanging information, or asynchronous processing.
Middleware is a kind of independent system software or service program, distributed Application system uses this kind of software to share resources among different technologies, manage computing resources and network communication. It is a key software in the computer system, it can realize the interconnection and interoperability of the application, and can ensure the safe, reliable and efficient operation of the system. Middleware is located between user application and operating system and network software, it provides common communication means for application, and is independent of network and operating system. Middleware provides developers with an application interface that is common to all environments, and when embedded in the application, it can use the functions of the specific operating system and network environment in which it runs to perform communication functions for the application.
If there is no message middleware to complete the exchange of information, application developers in order to transfer data, must learn how to use the network and operating system software functions, to write appropriate applications to send and receive information, and exchange of information there is no standard method, each application must be specific programming, and multiple platforms, One or more application communications in different environments. For example, in order to achieve communication between different host systems on the network, it will require knowledge of how to exchange information on the network (for example, by using TCP/IP sockets); In order to achieve communication between different processes within the same host, knowledge such as the operating system message queue or named pipe (pipes) is required
The message transfer middleware (MOM) is one of the many types of middleware currently available, such as transaction management middleware (IBM's CICS), Web application Server middleware for Java applications (such as IBM's WebSphere Application server), and so on. It simplifies the transmission of data between applications, masks low-level heterogeneous operating systems and network platforms, provides consistent communication standards and application development, and ensures reliable, cross-platform information transmission and data exchange in distributed computing networks. It is based on the storage-forwarding mechanism of message queues and provides a unique asynchronous transmission mechanism, which can realize application integration and data exchange based on message transmission and asynchronous transaction processing.
With its unique security mechanism, simple and fast programming style, exceptional stability, scalability and Cross-platform, and powerful transaction processing and messaging capabilities, the IBM messaging middleware MQ becomes the industry's highest-market-share messaging middleware product.
MQ has a powerful cross-platform, it supports up to 35 of the number of platforms. It supports a variety of mainstream UNIX operating system platforms, such as HP-UX, AIX, SUN Solaris, Digital Unix, Open VMX, SUNOS, NCR Unix, and support for a variety of host platforms, such as: os/390, Mvs/esa, Vse/esa ; Windows NT servers are also supported. Supports Windows9x/windows nt/windows 2000 and Unix (UnixWare, Solaris) and major Linux versions (Redhat, Turbolinux, etc.) on the PC platform. In addition, MQ also supports a variety of other operating system platforms, such as: OS/2, as/400, Sequent Dynix, SCO OpenServer, SCO UnixWare, tandem, etc.
Ii. The basic concept of MQ
1) Queue Manager
The queue Manager is the topmost concept in the MQ system, and it provides a queue based messaging service for us.
2) message
In MQ, we define the data that the application sends to MQ as a message, and we can define the content of the message and understand the message in a broad sense, such as the user's various types of data files, the processing requests that an application makes to other applications, and so on. The message consists of two parts:
The message descriptor (the messages discription or the message Header) that describes the characteristics of the message, such as the priority of the message, the lifecycle, the information ID, and so on;
The body of the message, the User data section. In MQ, messages are classified into two types, non-persistent (non-persistent) messages and persistent (persistent) messages, and non-persistent messages are stored in memory and are designed to improve performance and are not recoverable when the system drops power or the MQ Queue Manager restarts. When the user's reliability requirements for the message are not high, while focusing on the performance of the system, you can use this type of message, such as: When the stock information is released, because the stock information is constantly updated, we may be published every few seconds, new messages will continue to overwrite the old message. Permanent messages are stored on the hard disk, and record the data log, it has high reliability, in the network and system failure, etc. can ensure that the message is not lost, not heavy.
In addition, there is the concept of logical and physical messages in MQ. With logical and physical messages, we can segment large messages, or we can classify several of our own complete messages into one group for processing.