Implementation of replica manager classes

Assignment Help JAVA Programming
Reference no: EM131243737

FOUNDATIONS OF DISTRIBUTED SYSTEMS

Aim:

The purpose of this assignment is to exemplify and explore some important issues of replication. This assignment requires an understanding of the basics of remote procedure calling and replication.

Method: students will attempt this assignment individually.

In Assignment, we have implemented a Tram Tracking service using a model similar to the one shown in the following diagram:

1153_Figure.jpg

In this assignment you will extend the Assignment 1 model above to support active replication. For that purpose, this assignment requires you to add:

a) Three Replica Manager (RM) for the server component that tracks locations of trams and

b) A server Front End (FE) with which Tram clients will communicate using RMI. The FE will forward remote method calls to all available RMs and forward results back to Tram clients using RMI.

The new system architecture is shown in the following diagram:

938_Figure1.jpg

Front End (FE) hides replication management from the client, communicates with one or more Replica Managers, provides replication transparency. Each RM is a replication of the Tram Tracking server, process incoming requests independently but identically.

System requirements:

- The Trams will only communicate with the server Front End via RMI using the Remote interface shown in the diagram above.

- The system consists of three Replica Managers. Each RM is a replication of the Tram Tracking server to provide communication with server FE via RMI using the same Remote interface shown in the diagram above.

o In this assignment, FE and RMs are all running on localhost, but at different ports (in reality, they can run on different servers having different IP addresses and ports)

- The FE must always be running and at least one RM will be running at any given time to provide fault tolerance.

- When a Tram makes a remote method call to the server Front End:

1. FE will first call a listTramService() method to find out which RM is running. The results of this listTramService() call should also be printed out on the Console of the FE, for example: RM1 on | RM2 off | RM3 on.

2. For each RM that is running, the FE will call the corresponding remote method on that RM, passing the input Message object and receiving a return Message object from that RM. Then the FE will forward that returned Message object to the Tram client. All of this will be performed using RMI as shown in the above diagram.

- While the system is running, at most 2 RMs can be killed and the system should continue simulating the tram movement as usual.

What to demonstrate

Demos will be running in Week 11 and 12 in the labs. No concurrency control needs to be implemented, so users can interfere with each other's operations in a way that leads to error conditions, as allowed by the Unix file system.

You need to demonstrate the system with one server FE, three RMs and several Trams running at the same time. You will need to show service continuity in presence of failure: two RMs will be killed and the system should continue simulating the tram movement.

Acronyms: Replica Manager (RM), Server Front End (FE), Tracking Service (TS)

Server Components

- Implementation of 3 Replica Manager classes

o Alternatively, you can have 3 RM objects created from the same RM class running on 3 different RMI registries
- Implementation of the Server Front End class
- The FE object and the 3 RM objects must be registered on different RMI registries running on localhost but at different ports

o totally 4 RMI registries will be used, one registry for the FE to register and each RM registers to a different registry
- The listTramService() method is implemented as a local method in the FE class (5 marks)
- The FE will not do any major Tram Tracking task. FE will only do the following tasks: listTramService
(check which RM is available), multicast remote method requests to available RM, send returned results to

Tram clients
- All the tasks in FE (for example identify the registry, identify the remote servers, checking which RM and
server are working/not working) are separated into methods. (5 marks)

Client Component
- Many instances of the Tram class can be run simultaneously using multithreading (between each update
request, each tram client sleeps for a time interval that randomly varies between 10 to 20 seconds) (5 marks)
- Tram clients only communicate with the Server Front End (5 marks)

Functionalities
- Each RM can be started and stopped when your application is running without interrupting your application (all Exceptions are caught correctly)

o While the system is running, at most 2 RMs can be killed and the system should continue simulating the tram movement as usual.

- Whenever a Tram client invokes a remote method on the FE, the FE will first invoke its listTramService() method locally to find out which RM is running. The results of this listTramService() call must be printed out on the Console of the FE, for example: RM1 on | RM2 off | RM3 on.

- After running the listTramService(), for each RM that is running, the FE will call the corresponding remote method on that RM, passing the input Message object and receiving a return Message object from that remote method call. So FE will multicast remote method calls to all available remote RM objects. Then the FE will forward only one returned Message object to the Tram client.

Other Requirements

- Methods in the Remote interfaces only accept input arguments of type Message and return an object of type Message. Marshalling and unmarshalling operations must be applied as in Assignment 1

- All exceptions are caught and handled correctly. At least the following types of exception must be caught: RemoteException, NotBoundException, Exception.

- All source codes are given detailed comments and formatted properly

Attachment:- NewRMI Instructions.rar

Verified Expert

The solution was developed, by implementing the java .The project developed by starting the Remote servers based on requirements. The application may be executed on any of the server.To switch over another server user may halt any server. The remote method invocations for process execution. The complete application developed by using Eclipse IDE.

Reference no: EM131243737

Questions Cloud

Is susan making an economic or a financial investment : Suppose that the city of New York issues bonds to raise money to pay for a new tunnel linking New Jersey and Manhattan. An investor named Susan buys one of the bonds on the same day that the city of New York pays a contractor for completing the fi..
Discuss role of relation and power in negotiation process : Discuss the role of relationship and power in the negotiation process. If your Boss has more power in the negotiation process for a higher salary, how would you counterbalance him or her?
How did the u.s. economy perform : Visit the Federal Reserve's Web site at www.federalreserve.gov, and select Monetary Policy. Then click on Reports and then Monetary Policy Report to the Congress to retrieve the current annual report (Sections 1 and 2).
What are entrepreneurial implications of not appreciating : What are the entrepreneurial implications of not appreciating or understanding the role and contribution of families to the economies of our communities and countries?
Implementation of replica manager classes : The purpose of this assignment is to exemplify and explore some important issues of replication. find out which RM is running. The results of this listTramService() call should also be printed out on the Console of the FE,
Find the most recent values for the following interest rates : Are these rates higher or lower than they were 3 years ago? Have they increased, decreased, or remained constant over the past year?
How do groups normally develop : Based on your self-assessment, what do you see as your strengths and weaknesses regarding working on team? Have you ever engaged in social loafing while on a team? Why or why not? How do groups normally develop?
How does your racial and ethnic identity affect your life : What is the source (historical, structural, political, cultural) of racism in your environment? What underlying values support the nature of the race and ethnic group interaction you've observed?
How do mortgage backed securities work : What do economists mean when they say that monetary policy can exhibit cyclical asymmetry? Why is this possibility significant to policymakers?

Reviews

inf1243737

11/2/2016 4:43:51 AM

thanks for your help guys, i'm new to this session that's why the problem occurred. Now i am happy with the work, expert cleared all my queries. thank again.

inf1243737

11/2/2016 4:42:08 AM

How do I run the other Tram? Currently the program is only running Tram 89 and Tram 3 Sorry, my bad, meaning to ask why did the tram stop/goes through only 2 stop while the route listed several tram stop is available? the previous problem I have managed to solve it. Leave only the problem with the stopping of the RM2 eventhough the other RM is still running. 1 more problem, it seems like i'm unable to stop RM2 once I started it. I can stop the other RM, but can stop RM2 eventhough the other RM are still running User can use Ctrl+p to halt the server in normal java environment. Eclipse ide contains halt button (red colored button can use to halt rm2. Please forward as it is. replace the following code in Trackingservice.java private static void stoprRM2() { myServer2.requestStop(); RMIAbstractService.removeRMIService(ServerInfo.RMSERVER.RM2.serverName(), ServerInfo.RMSERVER.RM2.port());

len1243737

10/15/2016 6:28:11 AM

-Java RMI & Active Replication -Development using Eclipse IDE -Need some clarification/comments on the codes -Skeleton/base code

Write a Review

JAVA Programming Questions & Answers

  Develop a similar class hierarchy for animals

Java programmers can use class hierarchies for the purposes of inheritance. Develop a similar class hierarchy for Animals

  Design and implement a small and simple email server using

design and implement a small and simple email server using the concept of web based information system. your system

  Implement a program that will play the old guessing game

Your assignment is to implement a program that will play the old guessing game "I'm thinking of a number between 1 and 100". The program will be in a webpage

  Objectivesbullto exercise the analysis design and

objectivesbullto exercise the analysis design and implementation activities of software development.bullto learn

  Write a program in java to implement the adt binary tree

Write a program in Java to implement the ADT Binary Tree part of whose definition is given below. You are also to write a driver program that demonstrates the correctness of your implementation by way of taking a series of commands from a text fil..

  The program should ask the user to enter the student'' answer

Your program should store these correct answers in an array. (Store each question's correct answer in an element of a string array.) the program should ask the user to enter the student's answers for each of the 20 questions, which should be stored i..

  Create a class named blooddata that includes fields

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and -). Create a default constructor that sets the fields to "O" and "+", and an overloaded c..

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Write an application that displays a table of the pythagorea

Write an application that displays a table of the Pythagorean triples for side1, side2 and the hypotenuse, all no larger than 100.

  Write java program to evaluate postfix expressions

Write a java program to evaluate postfix expressions containing complex numbers using a stack. This program should contain two classes.

  Write a program that prompts the user to enter a point

Write a program that prompts the user to enter a point (x,y) and checks whether the point is within the rectangle centered at (0,0) with width 10 and height 5

  Design a function named "falling distance"

Design a function named "fallingDistance" that accepts an objects falling time, in seconds, as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Design a program that calls the func..

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