4th National Undergraduate Research Opportunities Programme (NUROP) Research Paper (formerly known as NURP)


Building Distributed Applications with

Common Object Request Broker Architecture (CORBA) and Java

Michael Hu Junke and *Chue Wai Lian

School of Electrical and Electronic Engineering

Nanyang Technological University, Nanyang Avenue, Singapore 639798

ABSTRACT

     The explosive rate of introduction of distributed computing technologies in the last few years has resulted in some very powerful models of how an intelligent networked world may operate. Some of the more significant examples include Microsoft’s Distributed Component Object Model (DCOM), Object Management Group’s (OMG) CORBA specification and Sun Microsystems’s Java specification. However, CORBA is the preferred distributed object technology since it is structured to allow integration of a wide variety of object systems. This paper explores the basic concepts of CORBA, Java and the features of an Object Request Broker (ORB) named VisiBroker for Java from Visigenic. In addition, an application example based on CORBA and Java will be presented to illustrate the basic concepts.

INTRODUCTION

     CORBA is a specification for distributed objects from the OMG. The specification defines a language and platform-independent object bus called an ORB. Like CORBA, Java has the key advantages of being platform-independent. In addition, Java’s applet sandbox security model and bytecode verification totally shield client(s) from malicious code. Reference [1] gives a detailed description of CORBA and Java.

     Distributed object technology may be considered to include three technologies that have been merged to provide something quite powerful than the sum of their individual parts. They are object, distribution and Web technology in the order of their emergence.

     In object technology (OT), systems are viewed as cooperating objects that addresses complexity, improves maintainability, promotes reuse and reduces life-cycle costs of software.

     Distribution technology (DT) involves independent computers that are connected by a network. The advent of smaller, more powerful and less expensive microprocessors created an interest in distributing functionality over multiple communicating computers. Over time, the notion of distribution has generally migrated from tightly coupled, geographically close, homogeneous machines to more loosely coupled, geographically remote, heterogeneous machines.

     Web technology (WT) caused an explosion in the use of the Internet and Intranet. The ability to create pages of information that can be accessed anywhere in the world via a Web browser is the most popular aspect of WT. Also, the introduction of the object-oriented language Java, brought about Java applets that provided "mobile objects" or "executable content" as compared to the previously static WT.

     The combined use of these technologies (OT, DT and WT) changes the fundamental way in which systems are engineered. Objects have been added to networks and integrated with middleware called ORBs. Objects are being used in distributed systems to represent units of distribution, movement and communication while the addition of WT provides portability.

JAVA ORB

     VisiBroker for Java from Visigenic is an example of a Java ORB. Figure 1 illustrates how an applet handles the server’s object reference, the data marshaling and the operation invocation using the Internet Inter-ORB protocol (IIOP).

Figure 1 Visibroker for Java from Visigenic

     The broker server in Figure 1 may be viewed as a "middleman". The broker server is a server to the client applet while the broker server is a client to the server object. In other words, the broker server acts like a proxy server in relation to the applet and it acts like a proxy client in relation to the server object. Therefore, the broker server uses all the features that a client would normally use. The broker server may be thought of holding the identity of a "broker" as in a stock exchange.

     In VisiBroker for Java from Visigenic, the broker server is known as a Gatekeeper which also doubles as a Web Server supporting Secure Socket Layer (SSL). The Gatekeeper enables VisiBroker applets to communicate with object servers across networks while still conforming to the security restrictions imposed by Web browsers and firewalls. Thus, the gatekeeper serves as a gateway from an applet to server objects even if a firewall is restricting access.

     By serving as a proxy for communication to remote servers, the Gatekeeper enables Java applets to access server objects on multiple hosts. Therefore, Java applets are no longer restricted by the Java "sandbox" to communicate with the host from which the applet was downloaded. The Gatekeeper forwards calls from applets to server objects which can reside anywhere on an enterprise intranet. Proxies for communication with remote server objects are created dynamically as object references pass through the Gatekeeper.

ONLINE BANKING APPLICATION

     Suppose that three banks (POSB, OCBC and OUB) intend to setup a Web-based application to permit banking transactions such as checking of balance to be performed via the Internet. Figure 2 shows a typical setup with three isolated object servers. The following software were used for development: VisiBroker for Java from Visigenic, Java Development Kit (JDK) from Sun Microsystems and Microsoft Access 97. Both the POSB and OCBC Servers are "simple" database servers (the database format is a custom-designed one) while the OUB Server is based on Microsoft Access 97. Note that the POSB server is running under Sun Solaris while both the OCBC and OUB Servers are running under Microsoft Windows 95.

Figure 2 Bank Application example

     VisiBroker’s ORB Smart Agent (osagent) must be executed first before any object servers are activated. The osagent is a dynamic, distributed directory service that provides facilities for both client applications and object implementations. When a client application invokes the bind method on an object, the osagent locates the specified implementation and object so that a connection can be established between the client and the implementation.

     Object implementations register their objects with the osagent so that client applications can locate and use those objects. When an object or implementation is destroyed, the osagent removes them from its list of available objects. Note that an osagent may be started on any host.

     Executing the Server.java program (vbj Server) activates an object server. Firstly, it initialises both the ORB and the Basic Object Adapter (BOA). Next, an AccountManager object will be created and activated, after which it waits for incoming requests from any client. For simplicity, the AccountManager object consists of the name and balance of an account.

     Since the OUB server is based on Microsoft Access 97, the Open DataBase Connectivity (ODBC) must be set up first before activating the Server.java program. This specifies the type of database format to be used (MDB for Microsoft Access 97) and other relevant information such as the name of the database.

     The broker server is activated by executing the Gatekeeper in the same directory where the Java applet for the client, ClientApplet.class resides. The ClientApplet.class creates a Graphical User Interface (GUI) for the applet and establishes connection with the three object servers.

     The client executes the ClientApplet.class by using any Java-enabled Web browser. An example of the Uniform Resource Locator (URL) for the applet is http://155.69.60.111:15000/ClientApplet.html where 155.69.60.111 is the machine name (or IP address) of the broker/web server, 15000 is the port number and ClientApplet.html is the HyperText Markup Language (HTML) file used to embed the applet (ClientApplet.class).

     Once the ClientApplet.class is initialised, the client(s) may perform the following transactions with any of the three banks: Open a new account, Check his/her balance, Deposit and Withdraw money.

CONCLUSION

     Although the Web, Java and CORBA are technologies for distributed systems, they complement each other more than they compete. One way of differentiating Java from CORBA is that Java provides "mobile objects" within a homogeneous computing environment (i.e. all computation occurs within a Java Virtual Machine), while CORBA provides remote objects, assuming a heterogeneous computing environment. The Java ORB concept seems to build great promise for distributed computing since CORBA and Java are both platform-independent. The online banking application discussed earlier may be extended to include secure communication between client(s) and server(s) with the VisiBroker SSL Pack from Visigenic. Future distributed applications based on CORBA and Java may include Internet Search Engines and cyber-shopping.

REFERENCES

[1] Michael Hu Junke and Tan Choon Boon (1997), Distributed Object Technology with CORBA and Java, Proceedings of NURP Congress

[2] Robert Orfali and Dan Harkey (1997), Client/Server Programming with Java and CORBA, John Wiley & Sons

[3] Robert Orfali, Dan Harkey and Jeri Edwards (1997), Instant CORBA, John Wiley & Sons

[4] Alexander Newman (1996), Special Edition Using Java, Que

[5] Visigenic's Web site, http://www.visigenic.com

[6] Object Management Group's (OMG) Web site, http://www.omg.org

[7] Sun Microsystems Web site, http://www.javasoft.com


Home PageTable of Contents


Copyright© 2007 by Chue Wai Lian

Last updated on Wednesday, 26 December 2007

Please send all mails to wailian at hotmail dot com