Combined Use of CORBA and Java

Source: Internet
Author: User

 


Learning to use the CORBA editor to access the server's distributed Java application of the image
------------------------------------------------------------------------

Abstract: If you want to implement the application sequence of distributed customer machines/Server models on the Web, you can choose different technologies. But yes, for applications that must be used by a large number of users, we think that we should choose the first choice of CORBA, because of its scalability and extensive support in the industry. Because the strong robustness of CORBA can improve the performance of Java programming languages, it uses existing quasi-standard-based techniques, java developers can compile Web applications with high performance. In this chapter, we will first describe a single piece of CORBA, and then use it as an example of this technology, we will compile a N-layer Client/Server program by hand. In addition, in the appendix, we compared several distributed object technologies, which are divided into CORBA, RMI, and DCOM.

By using HTML tables and Common Gateway interfaces, users can access each other using server scripts on Web sites. This technique is used on many network points to indicate that the user enters the user name and password. After these scripts are imported to the server, the user is used to verify whether the user can access a specific content in the website. This process uses HTTP, which is a kind of stateless negotiation. Each time a page is loaded, the client and server are completely detached from the server. The server has no information from the client, it is even more difficult to know that the customer's machine after the departure is in the action. In this case, I am afraid that after a successful login to a certain network point, each page of the customer's route query will be queried, you still need to pass the user name and password to the server for re-identification. In other words, between the Web browser and server, it is not stored in the Department's variable volume, method adjustment, or object.

After dozens of years of hard work, software developers can easily add code tokens to the shape of the image for sealing. However, as mentioned above, it is clear that we are moving backwards, because it is a stateless, batch processing computing model.

However, CGI techniques are not unique. Web has brought us a superior life-changing trend, which is based on the standard opening and release agreement and independence without any connection with the platform. Use HTTP and CGI to obtain user information, run a script on the server, and even send messages to the user. return message, however, from the perspective of traditional systems, these sites cannot be regarded as true "application steps ". In addition to this, the code generation for the new technologies (HTTP and CGI) must be completely re-written. If you want to use existing Web software resources or compile the application process with strong positive power, to enable Internet/Intranet as the communication master, the technologies used must have the following characteristics:

Why? C, C ++, and COBOL code
Why? With Java, how can we establish an application process for objects with a shift value and a plane independence? Industry-specific, only such, should be in the Process Order is easy to maintain, and will not be
Taobao.
Why? Scalability, supporting "C ++, Java", "Java, Smalltalk, Ada95,
C ++ "," Java, C ++ ",
"Java, C ++", "Java, C ++ "},
{"Http://www.expersoft.com", "http://www.iona.com ",
"Http://www.visigenic.com ",
"Http://www.software.ibm.com/ad/cb ",
"Http://www.sun.com/solaris/neo/solaris_neo/index.html "}};
ORBQuery (String name ){
Super (name );
}

Public java. lang. String GetName (int index)
{
String Name;
Name = ORBVendors [index] [0];
Return Name;
}

Public java. lang. String GetVendor (int index)
{
String Vendor;
Vendor = ORBVendors [index] [1];
Return Vendor;
}

Public java. lang. String GetOS (int index)
{
String OS;
OS = ORBVendors [index] [2];
Return OS;
}

Public java. lang. String getages (int index)
{
String ages;
Ages = ORBVendors [index] [3];
Return ages;
}

Public java. lang. String GetURL (int index)
{
String URL;
URL = ORBVendors [index] [4];
Return URL;
}
}

At this point, we have written the code that is required by the server provider. The next step is to create a customer application, the first customer ORB is activated, and then the server is activated and called.

Create a small application for CORBA

Just as the server object is logged on to the server ORB, the customer's small applications or application procedures need to be logged on to the client ORB. In order to obtain the remote client image, the customer's machine adopts a method of intercommunication. It knows the meaning of the customer's host ORB, ORB is responsible for ORB-to-ORB communication. This formula is implemented by the two lines below (in VisiBroker for Java ):

// Start ORB (use applet)
Org. omg. CORBA. ORB orb = org. omg. CORBA. ORB. init (this );
// Check the image of the ORBInfo interface to be called by the applet
ORBInfoQuery = ORBQuery. ORBInfoHelper. bind (orb, "ORBInfo ");

After the bind () method is executed, our ORBInfoQuery local variation is bound to the server's ORBInfo object. After this operation is completed, we can call the Helper method to implement the customer's small application. Remember, we fully use the Java language in the example. However, in practice, the server object can also be implemented in other languages, for example, COBOL, C ++, Ada, and Small talk.

Conclusion

Compared with the pure Java small application, the creation of the Java application for CORBA is slightly more complex. In practice, this is more difficult than using RMI to create a pure Java distributed object. However, for the combination of CORBA and Java, the application sequence created can be larger and more extensible, this is not a method for deploying JDK. In addition, Java applications are rarely used in enterprise circles. The choice of both sides is the best choice. On the one hand, it allows developers to use existing code-based protection investment, on the other hand, the Java programming language can be used as an excellent feature.

Distributed Objects: DCOM and RMI

Many developers of Java can be familiar with DCOM and RMI, which are the competitors of the two main players of CORBA. Now let us compare the three.

Description of CORBA

There are several basic advantages of CORBA: independence from the opening speech, the independence of the attacker and the independence of the operation system. The ORB of CORBA is implemented in each of the previous main stream operating systems (for Microsoft's operating systems only, the support obtained by CORBA is even greater than that obtained by DCOM ). In addition, the corba orb can access the Real-Time objects (including C ++, COBOL, Smalltalk, and Java) in multiple languages ). With help from IIOP, a certain issuer (such as Visigenic) can obtain the knowledge of the corba orb, the counterpart developed by another developer (such as IONA) of the remote engineer. Java ORB allows the client to implement the Java client's procedure without installing any special software. (The Java ORB class can be loaded in an dynamic state with the applet, or bundled with the browser .)
DCOM: Microsoft faobao

Before that, Microsoft's Distributed component-to-image model (Distributed Componont ObjectModel) only runs on two operating systems: Windows 95 and Windows NT4. Microsoft is working with third-party publishers to move DCOM to its operating system (including MVS and Several UNIX operating systems ). Like CORBA, DCOM is a stand-alone language. It uses Microsoft's OSS (ODL) to describe the object through the interface.

Compared with CORBA, DCOM has three major defects. First, it is defined and controlled by a single initiator (Microsoft, this big limit makes DCOM use of the choice of Fan Wai (bifang said the development of work tools and wind grid ). However, DCOM lacks many platforms for support, which greatly reduces the reusability of code and the scalability of DCOM applications. At the very end, DCOM is an uncommon technology compared with CORBA. Although Microsoft was adding information and transaction support to DCOM, these achievements have been implemented in 2.0, and there are several different CORBA software.

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.