Write the java rmi interface definition, JAVA Programming

Assignment Help:

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.


Related Discussions:- Write the java rmi interface definition

What is meant by semantic error, What is meant by semantic error? Occur...

What is meant by semantic error? Occur although a statement executes and has an effect not intended by the programmer and Frequently times occur just in unusual & infrequent ci

Write a algoritm to play blackjack , Draw: loops through the list of cards ...

Draw: loops through the list of cards drawing them in a single row starting from the screen position referred to by the 'x' and 'y' fields of the Hand class. You can limit the numb

Conditional statements in javascript, Very frequently when you write code, ...

Very frequently when you write code, you desire to perform distinct actions for different decisions. You can employ conditional statements in your code to do this. In JavaScript

What is white space explain proper use of white space java, What is White S...

What is White Space? explain proper use of white space in java? White space consists mainly of the space character in which you generates through hitting the space bar on your

Simulated annealing, implement simulated annealing for cable company proble...

implement simulated annealing for cable company problem

How to draw polygons in java, How to draw Polygons in java? In Java rec...

How to draw Polygons in java? In Java rectangles are defined through the position of their upper left hand corner, their height, and their width. Therefore it is implicitly sup

Algorithms, COMPSCI220S2C2012 Assignment 1 due 8 August 8:30 pm This assign...

COMPSCI220S2C2012 Assignment 1 due 8 August 8:30 pm This assignment introduces you to an example of applied algorithm analysis and shows you why, sometimes, compromises in an algor

Want an android app to be build, Want an Android App to be Build What i ...

Want an Android App to be Build What i want is a Taxi App for Android and if good price for iOS too. The App want to have a Website where to add Cars whit all information and

User defined key class in the hashtables aur hashmap, You should override ...

You should override the hashCode() and equals() functions from the Object class. The default implementation of the hashcode() and equals(), which are inherited from the java.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd