Write the java rmi interface definition, JAVA Programming

In the programming assignments, you are going to develop a simple distributed ticket reservation system (DTRS). This system is used by customers (with unique 6-digit customerIDs) to reserve show tickets with different box offices and manage their reservations.

Assume that a show is identified by a unique showID (like MTL175 or TOR432) the first three characters of which identify the box office (like MTL for Montreal or TOR for Toronto) and the last three digits specify the show (like 175 or 432). The DTRS will run multiple servers, one per box office, maintaining the number of tickets available for each of the shows in that box office in main memory and the list of (customerID, numberOfTickets) for the already reserved tickets for each of the shows in that box office in a file (one file per show).

Customers may invoke the following operations on the box office servers through their client program:

reserve(customerID, showID, numberOfTickets): Reserve the required number of tickets (numberOfTickets) for the specified show (showID) for the customer (customerID).

cancel(customerID, showID, numberOfTickets): Cancel the specified number of tickets (numberOfTickets) for the show (showID) that the customer (customerID) had already reserved. The number of tickets cancelled may be smaller than or equal to the number of tickets reserved.

check(showID): Returns the number of tickets currently available for the specified show (showID).

Thus, this application has BoxOfficeServers (one per box office) implementing the above operations for the box offices and CustomerClients (one per customer, invoking the customer operations at the BoxOfficeServer managing the show on which the operation is to be done) on behalf of the customers as necessary. Thus, each BoxOfficeServer manages the shows within that box office and performs client operations on these shows; and a CustomerClient invokes a client operation at that BoxOfficeServer managing the show indicated in the operation. When a BoxOfficeServer is started, it registers its address and related/necessary information with a central repository. For each customer operation, the CustomerClient finds the required information about the BoxOfficeServer (based on the showID) from the central repository and invokes the corresponding operation.

Write the Java RMI interface definition for the BoxOfficeServer with the specified operations.

Implement the BoxOfficeServer.

Design and implement a CustomerClient which invokes the server to test the correct operation of the DTRS involving multiple BoxOfficeServers (each with a few shows) and multiple customerClients.

You should design a server that maximizes concurrency. In other words, use proper synchronization that allows multiple customers reserve/manage for the same or different shows at the same time.

Posted Date: 3/15/2013 4:04:44 AM | Location : United States

Related Discussions:- Write the java rmi interface definition, Assignment Help, Ask Question on Write the java rmi interface definition, Get Answer, Expert's Help, Write the java rmi interface definition Discussions

Write discussion on Write the java rmi interface definition
Your posts are moderated
Related Questions
A Mexican restaurant in London is struggling with preparing the meal ordered by it;s customer in time and has started loosing it;s business. The owner is looking at the possibility

The AOP module is used for developing aspects for our Spring-enabled application. Much of the support has been given by the AOP Alliance in order to ensure the interoperability amo

In this lab, you will practice using ArrayLists in two ways.  The first is in the problem domain class Question.java (see the UML diagram shown below) which contains data for trivi

Project Description: Give a script that will produce a pop-under on a mobile landing page -We can host our own landing page and we will want to change the destination URL for

Determine the Java Compiler Structure Source code for every class is in a .java file. Compile every class to produce -.class? file. Sometimes, multiple .class files are pack

Explain The java.net package Each package describes a number of classes, interfaces, exceptions, and errors. For instance, the java.net package contains these, classes, interfa

For this Assignment, submit the following program: Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The

Why is an Interface be able to extend more than one Interface but a Class can't extend more than one Class? Basically Java doesn't permit multiple inheritances, so a Class is r

We require responsible and serious programmer Project Description: Big Data and On-line tools Website Liferay - JAVA - Portlets - JSP and JSF Skills required: J2EE,

What is the difference between Internet and Intranet ? Intranet and internet are 2 domains which are extremely a like but frequent segregated in order to manage security. Inter