Distributed ticket reservation system, JAVA Programming

In this programming assignment, you are going to implement the simple distributed ticket reservation system (DTRS) from Assignment 1 in CORBA using Java IDL. In addition to the three operations (namely, reserve, cancel, and check) defined in Assignment 1, a modified distributed ticket reservation system in this assignment also has the following operation.

exchange(customerID, reservedShowID, reservedTickets, desiredShowID, desiredTickets):

Exchange reservedTickets for the show with reservedShowID with desiredTicktes for the show with desiredShowID for the customer with customerID, if possible. A client invokes this operation at the server managing the show with reservedShowID. The DTRS executing this operation first checks whether the customer with customerID has already reserved at least reservedTickets for the show with  reservedShowID. Then it checks if at least desiredTickets are available for the show with desiredShowID. If both conditions are satisfied, then the DTRS performs the exchange by reserving desiredTickets for the show with desiredShowID and cancelling reservedTickets for theshow with reservedShowID. Note that this reserving and cancelling should be done atomically; that is, both should succeed or both should fail.

Note that in order to perform an exchange operation, potentially two DTRSs need to communicate between themselves. A client sends an exchange operation to the DTRS managing the show with reservedShowID which performs this operation by (i) sending an exchange  message to the DTRS managing the show with desiredShowID if it currently has at least reservedTickets for the show with reservedShowID, (ii) upon receiving this exchange message, the other DTRS replies a canExchange message, if it currently has at leastdesiredTickets for the show with desiredShowID, after updating its information and (iii) upon receiving the canExchange reply, the DTRS which initiated this exchange properly updates its information. Obviously, all these operations must be performed atomically (in an all-or-none fashion) without any interference from other operations. Furthermore, for performance reasons, implement all these communication among DTRSs for the exchange operation using the UDP/IP datagram protocol.

In this assignment you are going to develop this application in CORBA using Java IDL.

Specifically, do the following.

Write the Java IDL interface definition for the modified DTRS with all the four specified operations.

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

Test your application by running multiple clients with multiple servers. Your test cases should check correct concurrent access of shared data, and the atomicity of exchange operations.

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







Related Discussions:- Distributed ticket reservation system, Assignment Help, Ask Question on Distributed ticket reservation system, Get Answer, Expert's Help, Distributed ticket reservation system Discussions

Write discussion on Distributed ticket reservation system
Your posts are moderated
Related Questions
JDBC stands for Java Database Connectivity: It is an API which gives easy connection to a wide range of databases. To connect to a database we have to load the appropriate dri

How can you define a readable program? A program that is easy to read & understand also easy to maintain and enhance. Readability is the ease in that text can be read and under

What is Alternate Text ? The APPLET element can have an ALT attribute. An ALT attribute is used through a browser which understands the APPLET tag but for some purpose cannot

In this experience you will make the neophyte Java programmer happy by solving, to a limited extent, an age-old problem in programming:  mismatched delimiters.  As we all know, eve

Create a class HourlyWorker mind: particularHourlyWorker employee. • Declare two data members named wage and hours of double type with private access. • Implement a parameterized c

1. Which of the following are not valid Java identifiers, and why? (a) wolVes (b) United(there is only one) (c) 87 (d) 5 3 (e) Real ale (f) isFound?by 2. A cla

Aspect-Oriented  Programming  (AOP)  represents  OOP  (Object  Oriented  Programming)  by  giving  the developer to dynamically change the static OO model to make a system that can

For what purposes FTP is used in networks? FTP is known as file transfer protocol it is basically used to download or upload files / data to a remote computer.

write a program that count the number of occurences of string in the n-th padovan string p(n)   program in java // aakash , suraj , prem sasi kumar kamaraj college progr

What is best algorithm? Greedy algorithm is the best algorithm as it is n algorithm in which always takes the best immediate, or local solution although searching an answer.