Today I wrote a paper on middleware.

Source: Internet
Author: User

<?xml:namespace prefix = o/>

Summarization and implementation of middleware technology

 

 

 

 

 

        

Class: 05 count 2

School Number: 0500402211

Name: Sheng

Achievements:

 

 

 

 

<?xml:namespace prefix = st1/>2008 year one day

One, A survey of middleware technology

Computer technology has developed rapidly. From the view of hardware technology, the CPU speed is more and more high, processing ability is more and more strong; from the software technology, the application scale is expanding, especially the internet and WWW, so that the application scope of computer is wider, many applications need to run on the Heterogeneous platform of network environment. All these have put forward the new demand to the next generation of software development. In this distributed heterogeneous environment, there are often a variety of hardware system platforms (such as PCs, workstations, small machines, etc.), on these hardware platforms, there are a variety of system software (such as different operating systems, databases, language compilers, etc.), and a variety of different styles of user interface, these hardware system platform <?xml : namespace prefix = v/> <?xml:namespace prefix = w/> may also use different network protocols and network architecture connections. How to integrate these systems and develop new applications is a very practical and difficult problem.

Middleware (middleware) is a kind of software, between system software (operating system and network software) and application software, it enables the application software to work across the network (i.e. interoperability), which allows the application software to cover the "system structure, operating system, communication protocol, Databases and other application services "are different.

Middleware can meet the needs of a large number of applications, can run on a variety of hardware and OS platform, it supports distributed computing, providing transparency across the network, hardware and OS platform applications or services interactive functions, support standard protocols, support standard interface.

The middleware has two parts:

1. Implementation environment (Execution environment) software: If an EE software is installed on each node of a network, mutual cooperation can be realized between the application software on each node. This allows each node to be a different machine and operating system. It also means that the EE software makes the devices below the nodes become transparent to the application software. So EE software is the key to realize interoperable function, and it is the main part of middleware. Application development (Application Development) tools.

2. The application software should be able to use the resources of a distant partner transparently, and the software should have corresponding instructions for making such transparent use. For this, there must be a set of tools that can be used to develop applications with "transparent use of each other" component, or to transform existing applications that have no transparent use capability. This set of AD tools contains specialized languages (such as Interface Description Language and interface adjustment language) and related compilers. With it, the user (especially the application software developer) will be greatly facilitated, so the ad tool is a necessary part of a perfect middleware.

Classification of middleware:

According to IDC's classification method, middleware is divided into: remote process call middleware, database access middleware, transaction processing middleware, message middleware, distributed middleware. This paper mainly introduces the distributed object middleware.

Simply put, object-oriented middleware is a middleware that supports object-oriented development and integration applications with object-oriented technology.

The encapsulation, inheritance and polymorphism of object technology provide good code reuse function, and the external transparency of object conforms to the requirements of middleware technology. The basic idea of object-oriented middleware technology is to provide a unified interface. Make calls and data sharing between objects no longer care about the location of the object, the language and the hardware and software system that resides. Distributed object Technology currently has three OMG-organized CORBA, Microsoft com/dcom, Sun Java EE and so on, currently, CORBA, DCOM, RMI and other RPC middleware technology has been widely used in various fields. The following is mainly about CORBA as an example of distributed object technology.
CORBA (Common object Request Broker Architecture common Object Solicitation Broker architecture) is a standard object-oriented application system specification developed by the OMG organization. The OMG organization is an international non-profit organization whose responsibilities promote the development of object-oriented technology theory and practice in Distributed system development. The most critical specification developed by the OMG-the Object Management architecture (Management architecture, OMA) and its core (the CORBA specification) provides a complete architecture. This structure is flexible enough and rich in form to apply to all kinds of distributed integration. C-orb-a: "Common" + "orb" + "Architecture" universal "orb" architecture. It consists of three parts: the architecture of Object request Proxy Orb as a distributed object communication infrastructure, interface Definition language IDL syntax and semantics, and mapping to various programming languages to ensure interoperability between standard ORB communication protocol GIOP/IIOP.

Second, implementation of middleware technology

A CORBA application development process and environment are as follows:

Running platform:

§ Integrating Legacy systems

§ Performance and versatility tradeoffs

Network transport:

§ Programming Mode: DEC RPC, Java RMI, GIOP/IIOP

§ Communication protocol: TCP/IP

§ Communication Media

§ The continuity of the connection: fixed, moving.

Communication mode:

§ Sync

§ Deferred synchronization

§ One-way

CORBA Application Implementation Process

Object implementation: Object interface is actually a distributed object to provide services to the outside specification, is a client program and object implementation of a contract between the two sides must strictly adhere to the definition of object interface, including operation name, parameter table, return table, anomaly table, context, etc. Object interface definitions are stored in one or more IDL text files, indicating the external services provided by each object, and how the client program uses these services or the return results of the processing service. IDL is a descriptive language that defines component interfaces, does not define implementations, and then maps IDL to a specific programming language through the compiler, generating pile code and frame code. Here, the Java language is used to write object implementations and service programs, and product providers (Sun) provide IDL to language mappings, and code must inherit or use some of the generated interfaces and classes.

Service Program: The use of POA to activate the servo object for the client program to use, is generally a cycle of implementation of the process, constantly listening to customer requests and services

Client program: 1. Initialize orb: Get a reference to the Orb pseudo object, invoke the action provided by the Orb kernel, an object in the infrastructure, a local unified view, do not rely on the operation of the object adapter, get the initial object reference, create the policy object, run and terminate the process, and so on. 2. Get a reference to a distributed object and take advantage of the services provided.

To create and deploy an application: 1. Compile: Client code and generated IDL pile code and object implementations, service programs, and framework code. 2. Deployment: Tools and procedures are generally related to orb products.

The following is a remote out of storage management system to illustrate a CORBA application development process (programming language using Java implementation).

remote warehouse out of storage management system:

Remote Warehouse Management Company A large number of goods, to provide basic registration (different types of goods using different accounts), inventory, take goods, inquire about the number of goods function, a warehouse manager management.

First, write a storehouse.idl program that defines the object interface of the warehouse management system, which is mapped to the Java language by the IDL compiler (the compiler Idl2java provided by Visibroker for Java), producing the Java language Pile Code and framework code ( Stub and skeleton), and some ancillary files. Visibroker for Java IDL compiler Idl2java automatically generates 7 files for each interface (generated in a storehouse package): Accountoperations.java,account.java,_ Accountstub.java,accountpoa.java,accountpoatie.java,accounthelper.java,accountholder.java, where Account.java and Accountoperations.java define the full tone of the IDL interface account. The Accountoperations.java (operator interface) defines all the constants and methods defined in the account interface. Accountstub.java is the account object in the client's pile code, it implements the account interface, Accountpoa.java is the account object's service-side framework code, The Accountholder class declared by Accountholder.java provides support for passing objects.

Then, according to the generated pile code and framework code, the cargo account and the warehouse manager program are written.

Finally, you can write a service program called Server.java, which creates a servo object for the client to use.

The application can be executed in a certain order.

  | /strong>

§       An account's entity model.

§       balance: Represents the current quantity of this shipment.

§       Deposit: Inventory

§        Withdraw: Pickup

§       getbalance: Query the remainder of the goods

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.