Distributed programming based on Javaidl

Source: Internet
Author: User

Javaidl Introduction

Javaidl is a CORBA feature extension in the Java 2 development platform. The introduction of Javaidl in Java 2 enables the use of OMG IDL to define the basic functionality of the service object and to map the IDL to the Java language, as required by the CORBA specification, and to develop a standard interoperability and connectivity distributed application. JAVAIDL enables distributed, Web-enabled Java applications to invoke remote services transparently, based on the IIOP protocol.

The Javaidl Runtime (Runtime) component includes a fully compatible object request agent?? Java ORB, used to implement communication between distributed objects based on the IIOP protocol. The orb supports transient CORBA objects and transient name servers, and the Orb lifetime is limited by the lifetime of the orb process running.

In the program design, the function of the service object to be implemented is analyzed systematically, and the IDL interface description file is created to describe the function. The IDL file is then mapped to the client stub file and the server skeleton (skeleton) file using the IDL to Java Language Mapping tool provided by JAVAIDL.

In the implemented client application, it includes functions such as references to remote objects, the sending of service function requests, and parsing of the results of service object returns. Typically, a client application implements a binding of a remote object using a naming service and links the client to a service object through the client orb to implement a remote invocation of the method.

On the server side, the orb transforms the data format of the invocation request and parameter using the service object skeleton to convert the remote call to a call to a method in the local object. When the method returns, the skeleton converts and encapsulates the results, returning the results to the client through the orb.

The process of building a CORBA application

The main problem of distributed application design is to determine the relationship between client and service object based on object level, from its most fundamental function, the service object provides the remote interface, the client object calls the remote interface, the client object does not need to know the location and implementation details of the remote CORBA object, and does not need to understand Used for interaction between objects.

According to the basic process of implementation, CORBA object service can be implemented in two ways: the named reference method of the object and the way of the string object reference. CORBA's process of creating distributed applications is generally as follows:

Carry on the system analysis, determine the function that the service object needs to realize;

According to the result of the system analysis, compile the IDL interface documentation;

Compile the interface specification file, generate the skeleton of the service object and the client object of the pile (optional);

Based on the customer object of the pile, the preparation of client object program;

Based on the skeleton or dynamic request of the service object, write the service object program;

The client object and the service object program are compiled separately;

Start the service object program;

Start the Client object program.

Distributed Applications Sample

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.