The License Plate Game (Assignment 3)

Overview

This document describes the activities you'll perform as part of a two-part assignment associated with the license plate game. In this assignment, you'll enhance the game so that it uses CORBA. In addition, you'll get to use more of the TAO ORB, which provides an implementation of the CORBA 3.0 specification.


Part One of the Assignment

In the first part of the assignment, you'll enhance your previous license plate game program to use a CORBA architecture that supports multiple clients and a reactive server architecture. Each client will have its own session, in which it will read commands from standard input and display the results from the server on its standard output. The commands will be sent to the server process, which will use a reactive concurrency architecture to run commands and return results to each game session.

The license plate game server will be defined using two OMG IDL interfaces that should appear in the Game module. These two interfaces should be defined as follows:

For the first part of the assignment you need to do the following:


Part Two of the Assignment

In the second part of the assignment you'll actually implement the client and server application programs that actually perform the license plate game using CORBA. Below, we discuss the general behavior of these client and the server programs. See the course notes, the TAO online manual pages, and the Advanced CORBA Programming with C++ book for additional details.

Server Application

The license plate game server program should perform the following activities:
  1. Initialize the ORB, get a locality constrained object reference for the RootPOA, and activate the POA manager.

  2. Create and activate an instance of the LP_Game_Factory object and write its object reference to a file. If you are a graduate student, please replace the use of the file to exchange object references with the CORBA Naming Service, which is implemented in TAO.

  3. Run the ORB's event loop, which will perform the appropriate operation designated by the type of operation received from the client.

  4. You'll need to carefully reference count the number of threads that are accessing session resources so that your server behaves correctly when clients send quit() and shutdown() commands.

Client Application

The license plate game client program should perform the following activities:
  1. Initialize the ORB.

  2. Read the object reference for the LP_Game_Factory from a file and narrow it properly. If you are a graduate student, please replace the use of the file to exchange object references with the CORBA Naming Service, which is implemented in TAO.

  3. Read commands from the user's standard input, convert these into the appropriate operation calls to the LP_Game_Factory and LP_Game objects, wait for the reply, and display it to the standard output of the client.

  4. When a client is finished playing the license plate game, it should call quit() so the server has a chance to reclaim the game resources.
You should use the Makefile Project Creator (MPC) to generate the Makefiles or MSVC++ project files for the second part of the assignment.

If you're a graduate student, you should ensure that your server works with either the thread-per-connection or thread pool concurrency models supported by TAO. If you are an undergrad you simply need to make sure things work with the reactive model, which is the default in TAO. Please look here for more details on these concurrency models.


Concluding Remarks

I strongly encourage you to use, develop, and apply reusable C++ components based on the code you wrote for the earlier programming assignments.

Please see the online help for information on how to setup your development environment on Vanderbilt University's Linux computing system.