Programming Languages

G22.2110 Spring 1998

 

Project - Part I

Due date: 03/02/98

 

 

 

 

The class project studies programming language mappings required to interface modern Open Distributed Computing Environments such as CORBA (Common Object Request Broker Architecture). The implementation of a particular programming language mapping requires a thorough understanding of the corresponding language design concepts. The various parts of the project aim at developing a reasonably complex "heterogeneous" application, which integrates components written in various programming languages. The various components will exercise language features and design concepts.

 

  1. CORBA Narrative
  2.  

    At its most basic level, CORBA defines a standard framework from which an information system implementor or software developer can easily and quickly integrate network-resident software modules and applications to create new, more-powerful applications. It combines object technology with a client-server model to provide a uniform view of an enterprise's computing system.

     

    CORBA is based on a client-server model of distributed computing. In the client-server model, a request for service is made from one software component to another on a network. CORBA adds an additional dimension to this model by inserting a broker between the client and server components. The broker reduces the complexity of implementing the interaction between the client and server.

     

    The broker plays two key roles. First it provides common services, including basic messaging and communication between client and server, directory services, meta-data description, security services, and location transparency. Second, it insulates the application from the specifics of the system configuration, such as hardware platforms and operating systems, network protocols, and implementation languages.

     

    CORBA is solidly grounded in fundamental object-oriented concepts such as objects, classes, encapsulation, inheritance, and polymorphism. CORBA provides an Interface Definition Language (IDL) which is language independent, and supports multiple language bindings from a single IDL specification. Standard bindings include ANSI C, C++, SmallTalk, Ada95, and others.

     

    Abundant information concerning CORBA can be found at http://www.omg.org.

     

  3. Project Definition

 

The first part of the project will use a CORBA-compliant framework to develop a server object and a client stub object using ANSI C. The subsequent parts of the project will implement client applications in other languages. The resulting client and server components may or may not reside in the same address space.

 

We will assume a simple course registration object model, and provide a corresponding concrete IDL representation as follows:

 

module CourseRegistration {

// Forward Declarations

interface Course;

interface FacultyMember;

 

interface Student {

attribute string name;

attribute string address;

attribute unsigned long studentId;

attribute string major;

attribute float gradePointAverage;

exception ClassFull {};

void enroll( in Course course )

raises (ClassFull);

exception HasNotCompletedReqts {};

void graduate( )

raises (HasNotCompletedReqts);

typedef sequence<Course> CourseList;

CourseList class_list();

void notify_cancellation( in Course course );

};

 

interface Course {

attribute string courseSubject;

attribute unsigned short maxSize;

enum SchoolSemesters { FALL, SPRING, SUMMER };

attribute SchoolSemesters semester;

attribute unsigned long time;

attribute string days;

attribute unsigned short year;

void register_student( in Student student);

exception RoomSpaceUnavailable {};

void request_scheduling( in Time time,

in string days,

in SchoolSemesters semester,

in unsigned short year )

raises (RoomSpaceUnavailable);

void cancel_class( );

};

 

interface FacultyMember {

attribute string name;

struct OfficeHours {

string time, duration, days; };

attribute OfficeHours office_hours;

attribute string office_address;

attribute string department;

exception TeachingLoadExceeded { };

void assign_class ( in Course course )

raises (TeachingLoadExceeded);

typedef unsigned short TeachingHours;

TeachingHours current_teaching_load ( );

};

};

 

We will use the Inter-Language Unification (ILU) system which is available free from ftp://ftp.parc.xerox.com/pub/ilu/ilu.html. The system has already been downloaded and installed and you should simply add the following to your .cshrc file.

 

#

# ILU Environment Variables

#

setenv ILUHOME /spunky.a/adjunct/jcf/ilu

set path=( $path $ILUHOME/bin )

 

Also add $ILUHOME/man to your MANPATH, and $ILUHOME/lib to your LD_LIBRARY_PATH in your .cshrc file.

 

Please do not reinstall ILU in your own directory as it is not an exercise required for this project and doing so would clearly take up unnecessary space.

 

The ILU system comes with a comprehensive set of examples which should clarify the use of ILU in a very limited scope for this project.

 

The assignment for the first part of the project is detailed as follows:

 

  1. Using the above IDL representation, generate ANSI C client and server stubs using the c-stubber utility supplied by ILU (see $ILUHOME/examples/test1/README which illustrates the construction of a simple client/server application using ILU). Please create your own copies of the example(s) you use, as you will not be able to operate directly on the installation directory which is write protected. Do not hesitate to modify or adapt the IDL interface code (within reason) to generate the stubs. Any alterations to the IDL representation given above should be documented.
  2.  

  3. Implement simple routines to support the course registration database on the server side.
  4.  

  5. Implement a client test program that initializes the course registration database with a simple set of students, faculty members, and courses and let students register for one or more classes.
  6.  

  7. Provide complete listings and documentation for the project and turn them in by the project deadline. Please provide a readable path on the CS department sun network to facilitate the testing and grading of your working programs by the class TAs.
  8.  

  9. Please keep your running programs around as they will be needed for the subsequent parts of the project.