Home/Publications/Technical Reports
by:
William W. Pritchett
Huet C. Landry
The Common Object Request Broker Architecture and the revision to the Ada programming language - Ada 95, can provide systems within these guidelines.
The Common Object Request Broker Architecture (CORBA) is a set of commercial specifications produced by the Object Management Group, a consortium of hardware and software interests representing industry, government and academia. All CORBA specifications are consistent with the current TAFIM standards framework. CORBA has been described as being a "distributed object bus" [3] for software components, much like a hardware bus is for electronic components. A bus being the medium through which data is transferred.
Officially, CORBA is a set of specifications defining:
In CORBA-based applications, everything is defined in terms of objects which can alternate between client and server roles. An object is a client when it initiates interaction with another object. An object is a server when it receives and responds to requests from client objects. There are several benefits to basing applications on CORBA and include the fact that low-level communication protocols are hidden from the programmer as is the location of server objects. Additionally, CORBA is hardware, operating system and programming language independent; interoperable, and interchangeable. It is easy to see that CORBA fulfills the guidelines set forth by the TAFIM.
Programming language independence in CORBA is achieved through the use of an Interface Definition Language (IDL). IDL is the notation strictly used for specifying the interfaces of CORBA objects. Object interfaces contain only the definitions for the attributes and operations for a particular object and carry no behavioral information, much like an Ada package specification. IDL also supports inheritance across interfaces, allowing existing interfaces to be extended. The syntax to IDL is very similar to that of popular object-oriented programming languages. Many commonly used constructs can be defined in IDL including:
Implementing an IDL interface requires the interface to be compiled into a programming language that has a mapping from IDL. Current mapping exist for Ada 95, C, C++ and Smalltalk with mappings in the process for Fortran, COBOL, CLOS and Java. IDL is currently in the Committee Draft stage as part of the fasttrack process for standardization by the International Standards Organization (ISO). Adoption by ISO will mean that all application program interfaces (APIs) can be defined by a single, implementation dependent format, regardless of whether a CORBA-based implementation is used.
The emergence of a universal language for specifying APIs has both near-term and long-term implications. In the near-term, developers should start defining APIs in IDL and implementing systems in a cost-effective, reliable manner. Since IDL is a commercial standard, it may be possible to purchase much of the required functionality based on the desired interface, and develop the rest as needed. IDL definitions either exist or have been proposed for many common application facilities such as user interface, information management, systems management and task management. This enables the focus to shift to developing vertical or domain specific facilities, such as imagery or intelligence. To restate, the key is to have a stable, refined interface defined in IDL. As long as the interface does not change, it is likely that commercial implementations will be developed, thus freeing the organization from maintaining their proprietary implementation.
One of the languages that has an IDL mapping is the recent revision to Ada, popularly distinguished as Ada 95 [5]. Among the features new in Ada 95 are full support for object-oriented programming including inheritance and polymorphism, improved support for programming in the large with the addition of a hierarchical library structure, an improved tasking model, and better support for interfacing to other programming languages and commercial off-the-shelf software.
The IDL mapping to Ada 95 is a fairly natural one as Ada package specifications already contain many characteristics of IDL. Table 1. summarizes the how IDL is mapped into Ada 95.
IDL Construct Mapping to Ada 95 File Package Module Hierarchical unit (package) Interface Package w/ tagged type Operation Primitive subprogram Attribute Set_attribute and attribute_Of subprograms Inheritance Tagged type derivation Data type Ada types arithmetic arithmetic types enumerations enumerations types structs, unions records, variant records sequence instantiation of sequence generic arrays, strings array types, strings Exceptions Exceptions and record type
A more specific example of how IDL maps into an Ada package specification is shown below. Consider the IDL definition of a person interface that has a name and an age as attributes and operations to eat and sleep as shown below.
/* Class definition of a person */ interface Person { /* attributes */ attribute string name; attribute integer age; /* exception definition */ exception Busy {string explanation;}; /* operations with exception than can be raised*/ void Eat(in short how_much) raises {Busy}; void Sleep(in short how_long) raises {Busy}; };
This maps into the following partial Ada 95 package specification:
package Person is -- the type for the object reference type Ref is new CORBA.Object.Ref with null record; -- generated for the attribute - Name procedure Set_Name(Self : in Ref; To : in CORBA.String); function Name_Of(Self : Ref) return CORBA.String; procedure Eat(Self : Ref; How_Much : in CORBA.Short); Busy : exception; end person;
Of these techniques, wrappers for mediators and brokers are of the most interest when integrating heterogeneous data sources. This is a "smart wrapper" that can, among other things, perform data conversion as well as actively search out data from other sources, all transparent to the client. The client makes a simple request and the broker or mediator does the rest. It is this form of wrapper that was used in the reference implementation sponsored by DISA.
The purpose of the reference implementation was to demonstrate the applicability of CORBA and Ada 95 to systems developed for the Intelligence community. The main goal was to demonstrate that CORBA and Ada 95 technology could be used to seamlessly integrate different forms of data, while hiding the details from client applications [6]. For our purposes, we chose to integrate a traditional relational database with images stored on a Unix file system. The tools used to create the implementations are shown in the Table 2 below.
Tool | Vendor |
---|---|
database | oracle |
ORB | Orbix (Iona) |
Compiler | GNAT (NYU/ACT) |
GUI Builder | ScreenMachine (OIS) |
CASE Tool | Paradigm Plus |
Table 2. Reference Implementation Tool Suite
The application itself maintained and manipulated data on villages and people living in any region of the world. Users could update and retrieve information on villages and people to include both textual information and photographs. The focus was not on the application, but on demonstrating that the supporting technology not only existed, but could be used in this application domain. The details of the design and implementation follow.
A multi-tiered approach was used for the overall system consisting of a client used only for the presentation layer (user interface), a server which contained the business logic and responded to requests from the client through an object request broker (ORB), and a relational database management system (Oracle) as shown in Figure 3. The server communicated to the database via an Open Database Connectivity (ODBC) interface which is used for portable, distributed, SQL compliant database access.
For the design, we decided to proceeded as if the database schema already existed (which would be the case in a legacy application). With this assumption, the first step was to take the database schema and wrap it in IDL. Wrapping means to develop an IDL specification mapping the database tables into IDL interfaces, with the column names being the IDL interface attributes. For this reference implementation, the mapping was one-to-one, however, this will more than likely not be the case in a real application. As an example, consider the following table structure shown in Figure 4.
This mapped into the following IDL interfaces:
interface Village { attribute string Name; attribute string Location; attribute Photo Current_Photo; /* Plus operations to add and remove people */ }; interface Person { attribute string Date_Of_Birth; attribute string Gender; attribute string Name; attribute string Lives_In; attribute Photo Current_Photo; attribute string Comments; };
---------------------------------------
interface Civilian : Person { attribute string Occupation; }; interface Warrior : Person { attribute string Rank; attribute string Unit; }; interface Photo { attribute string filename; attribute string caption; };
Additional container classes were used to store collections of people and villages as well as factory classes to create civilians and warriors. For brevity, these were not shown here. Additionally, the data types of many of the attributes are shown as strings in this example when in the real implementation they were mostly user-defined types. A complete listing of the IDL specification can be found in the CORBA/Ada 95 Reference Implementation Server Interface Definition Report [7] which can viewed in the standards document library at http://www.itsi.disa.mil. Of particular interest, however, is how the image data was handled in the design. In Figure 4. notice the relationship established by the current_photo field in the person and village tables. If an image is present, this field contained the full file name of the image associated with the object. In IDL this mapped into the attribute, Current_Photo, found in the person and village interfaces. Using a combination of either the person or village interface with the photo interface, the client software can retrieve and display the associated photograph without additional user action. Clients only have knowledge of the interface presented and do not have to know the underlying data representation.
Once the IDL interface definitions were complete, the next step was to generate Ada code by running the specifications through an IDL compiler. This produces at a minimum, two Ada 95 packages (specification and body of each), a client stub and the interface implementation. Client applications make calls against the operations defined in the client stub. The functionality of the objects are added to the package representing the interface implementation.
procedure Demo is The_Person : Person.Ref; His_Age : Person.Age_Type; The_Village : Village.Ref; The_Photo : Photo.Ref; begin -- Given a village, give me the person with the name The_Person := Village.Person_Of(The_Village, “Mr. CORBA”); -- Given a person, get his age (text stored in RDBMS) His_Age := Person.Age_Of(The_Person); -- Given a person, get the photograph (an image) The_Photo := Person.Current_Photo_Of(The_Person); -- Display the photograph (server takes care of display) Photo.Display(The_Photo); end Demo;
As shown, the client application simply requests the photo of the person from the particular person object. Then the client application asks the photo to display itself on the client display. Although the actual interface is simple, at this level the example demonstrates that CORBA technology can be used to achieve seamless (to client applications) heterogeneous database access.
William W. Pritchett IV
Mr. William Pritchett is a Senior Computer Systems Analyst with the Systems & Technology Division of CACI, Inc.-FEDERAL in Fairfax, Virginia where he provides technical services on a variety of software engineering topics to Government clients. Before joining CACI, Mr. Pritchett was an electronics engineer with the Indian Head Division of the Naval Surface Warfare Center in Indian Head, Maryland where he designed simulators for surface launched guided missiles.
Mr. Pritchett received a B.S. degree in Electrical Engineering from Virginia Polytechnic Institute and State University and was later awarded an M.S. degree in Computer Science from The George Washington University. He is currently pursuing his Ph.D. in Information Technology from George Mason University.
William Pritchett
CACI, Inc.-FEDERAL
3930 Pender Dr.
3rd Floor
Fairfax, VA 22030
Voice : (703) 277-6765
Fax: (703) 277-1025z
Internet: bpritchett@std.caci.com
Huet C. Landry
Huet Landry is currently a Standards Development Analyst in the DISA Center For Standards, where he is in charge of Software Engineering Environment Standards - including Object Technology and Languages. Mr. Landry also serves as the Chairman of the Object Management Group's (OMG) CORBAUsers SIG, which is responsible for defining requirements for CORBA technology.
Within the DOD, Mr. Landry is a member of the Intelligence Systems Board Standards Panel, where he is working to develop a migration strategy for greater use of Object and Internet Technologies. He is also supporting similar work for the DIA's Multiplatform Integrated Database (MIDB) project.
Prior to his current position, Mr. Landry served 12 years as an Air Force officer, completing his service as the first Executive Officer for the Center for Standards. Other previous assignments include tactical C3I systems testing, technical trainer (Systems Analysis and Design) and Air Force Command level systems acquisition and development planning.
Huet C. Landry
DISA/JIEO/JEBE
10701 Parkridge Blvd.
Reston, VA 22091-4398
Voice: (703) 735-3565
Fax: (703) 735-3257
Internet: landryh@ncr.disa.mil