Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9528975

Have any Question?


Related Questions in Java

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As