Discuss the pros and cons of your design

Assignment Help JAVA Programming
Reference no: EM131279289

This assignment is based on the principles of clock consistency and associated drifts in a distributed system. You have to create a simulation, running on a single machine, of a simple distributed system involving four process objects (PO). Each PO will contain a logical clock, a concept first proposed by Lamport.1 The concept of the logical clocks and associated synchronization, based on the following rules, will attempt to resolve the clock consistency in this system:

1. Each event (internal, send, or receive) in the system is associated with a time-stamp, based on logical clocks.

2. Each PO, Pi, will have an associated logical clock, LCi. This logical clock is implemented as a simple counter that is incremented whenever an event takes place within that PO. Since a logical clock has a monotonically increasing value, it assigns a unique number to every event. The time stamp of an event is the value of the logical clock for that event. Hence, if an event A occurs before an event B in Pi, then LCi(A) < LCi(B).

3. A Pi will randomly decide if it wants to carry out an internal event or send a message to some other Pj . If it decides to send a message to a randomly selected Pj then it will attach the value of its logical clock to that message. A Pi may also decide to receive a message from another Pj if that Pj has sent a message to the Pi earlier.

4. Whenever a Pj receives a message from another Pi, it will advance its logical clock if the time stamp associated with the incoming message is greater than or equal to the current value of its logical clock, i.e., if Pj , receives a message (event B) from Pi with a time stamp t and LCj (B) ≤ t then Pj should advance its logical clock such that LCj (B) is equal to t + 1.

5. Any Pi, in the system, may exhibit Byzantine or arbitrary failures when it receives a message - e.g., it may choose not to advance its logical clock at all.

Your task is to:

1. Propose the interaction and failure models for this system. Discuss the pros and cons of your design.

2. Simulate this entire environment in C++ or Java using threads. Allow the simulation to reach a steady-state, i.e., run the program for a large number of iterations. During each iteration and at the end of the simulation compare the values of the logical clocks of POs - this comparison should indicate the clock drifts and their synchronizations. Repeat the simulation with different probabilities and access their effects on the clock drifts.

3. Create a brief report that indicates the aforementioned models and the analyses of the results of your simulation.

Please employ good software engineering principles in your design and implementation. The pro- gram must run on any machine from the following list:

in-csci-rrpc01.cs.iupui.edu 10.234.136.55
in-csci-rrpc02.cs.iupui.edu 10.234.136.56
in-csci-rrpc03.cs.iupui.edu 10.234.136.57
in-csci-rrpc04.cs.iupui.edu 10.234.136.58
in-csci-rrpc05.cs.iupui.edu 10.234.136.59
in-csci-rrpc06.cs.iupui.edu 10.234.136.60

Provide adequate documentation of your programs. Create a makefile for your program. Submit all the source files (including the readme, input/output and make files) by using submitd command on Pegasus/Tesla. Also, hand-in a hard-copy of the report at the beginning of the class on the due date.Assignment 1

Lamport's Clock

----------------------

Steps to run the program:

1) Command to compile all files will be:

make

2) To run the program

java LamportClock

This will run the program and show the final results.

------------------------

Files:

1) Makefile

to compile all the files.

2) LamportClock.Java

Contains the program.

3) Lamport's Clock.doc

Contains the report for the assignment

4) Assignment Solution.doc

Contains the answers to other questions in the assignment.

5) arish.zip

Attachment:- Java.zip

Reference no: EM131279289

Questions Cloud

Principal methodologies for modeling and designing systems : 1. What are the principal methodologies for modeling and designing systems? 2. What are alternative methods for building information systems?
Support and overrule administrative agency : In the following, provider organizations have sued an administrative agency. You answer for each letter how the court will decide by writing “support administrative agency” or “overrule administrative agency.” If the administrative agency did not fol..
What arguments most influenced your decision : Do you believe that pollution standards should be established for bottled water? What arguments most influenced your decision? How would you explain your position to someone who disagrees with you?
Governing law regarding emergency management : Identify a local or state government's governing law regarding emergency management. Local laws often are called ordinances and are compiled in a code of ordinances. State laws are typically called statutes and are compiled as part of the state co..
Discuss the pros and cons of your design : CSCI 53700 - Fall 2016 - Propose the interaction and failure models for this system. Discuss the pros and cons of your design and Create a brief report that indicates the aforementioned models and the analyses of the results of your simulation.
Extreme conflict in a family business : Extreme conflict in a family business if often a death knell for the business. For the businesses fortunate enough to recover, what does it take to recover from extreme conflict? What can all family businesses learn from the extremes of others?
Joint commission accreditation : The Midterm Exam is an applied case study scenario where you are the executive director of a long-term care facility that has decided to pursue Joint Commission accreditation.
Cultivate strong customer relationships and communities : How can companies attract and retain the right customers and cultivate strong customer relationships and communities? Name one important aspect regarding TANF and describe how it compares to other Government-sponsored plans. what is the primary role ..
Scientific definition in the book : Define Management by your own word and compare it with the scientific definition in the Book. Write notes about the Evolution of Management.

Reviews

inf1279289

11/18/2016 4:08:44 AM

What is expected from this assignment now: Each will have RMI registry.We have to create peer to peer interface. Each will act as client and server both. Peer one will have the option that whether he wants to connect to peer 2 or not. Each peer will have 3 lookups. We will have 4 peers in our case which will act client and server both. we will implement methods in all 4. we will have send and receive counter. The main implementation will be connection and lookup. We gather the drift values by having their own counters. I am sharing few of the documents the are shared by our professor and also one of the examples that he shared that will help us for this assignment.

inf1279289

11/18/2016 4:08:39 AM

I am just making sure that he is conveyed everything without any loopholes. And also please convey this important message to expert which i have mentioned in message. "So, here is the Assignment: We have to create peer to peer application using RMI. We have to convert our one of the previous assignments into peer to peer application. Previous Assignment: Luckily I gave the first assignment to expert minds and you just have to convert that assignment into P2P using RMI. I will attach the zip folder of the solutions of assignment one so that you can have a look at assignment and solution, and it will help you code.

inf1279289

11/18/2016 4:08:14 AM

So find attached the following thing: 1) assignment 1 with solutions which we have to convert. 2) study material P2P application using RMI http://isp.vsi.ru/library/Java/JExpSol/ch16.htm#CreatingPeertoPeerRMIApplications 3) running example Please give me the least amount possible as I am providing you with the solutions of the first one and also an example of running p2p application. And also last time I submitted an assignment, you were not able to deliver me on time. Please let me know if your expert is able to do all these stuff. That''s why i shared all the documents with you, as much as i can and please get back to me with price after you confirm this with your expert and he understands it completely. Please let me know if more information is required.

len1279289

11/16/2016 11:51:00 PM

Each peer will have 3 lookups. We will have 4 peers in our case which will act client and server both. we will implement methods in all 4. we will have send and receive counter. The main implementation will be connection and lookup. We gather the drift values by having their own counters. I am sharing few of the documents the are shared by our professor and also one of the examples that he shared that will help us for this assignment. So find attached the following thing: 1) assignment 1 with solutions which we have to convert. 2) study material P2P application 3) running example Please give me the least amount possible as I am providing you with the solutions of the first one and also an example of running p2p application. And also last time I submitted an assignment, you were not able to deliver me on time. Please let me know if your expert is able to do all these stuff. That's why i shared all the documents with you, as much as i can and please get back to me with price after you confirm this with your expert and he understands it completely. Please let me know if more information is required. Thank you.

len1279289

11/16/2016 11:50:27 PM

We have to create peer to peer application using RMI. We have to convert our one of the previous assignments into peer to peer application. Previous Assignment: Luckily I gave the first assignment to expert minds and you just have to convert that assignment into P2P using RMI. I will attach the zip folder of the solutions of assignment one so that you can have a look at assignment and solution, and it will help you code. What is expected from this assignment now: Each will have RMI registry.We have to create peer to peer interface. Each will act as client and server both. Peer one will have the option that whether he wants to connect to peer 2 or not.

Write a Review

JAVA Programming Questions & Answers

  Question a jsp expression can contain any java expression

question a jsp expression can contain any java expression that evaluates to aa string objectb java objectc primitive

  How you expected your strategy to improve performance

Evaluate the manner by which the threaded sort application performs - Propose a strategy to improve the performance

  Write a java program to simulate a lottery drawing

Write a Java program to simulate a lottery drawing. Your program should allow the user to enter values for k, n, and m above. Then, ask the user to enter the numbers that s/he wishes to play.

  Create an application with a jframe and five labels

Create an application with a "JFrame" and five labels that contain the names of five friends. Every time the user clicks a "JButton", remove one of the labels and add a different one. Save the file ass JDisappearingFriends.java

  What attributes would your class have

What attributes would your class have? What methods would your class have - In the HelloWorld program, what is "public" that appears on the line that defines the main method?

  Questions1 write a programme that computes the rental

questions1. write a programme that computes the rental charge given the type of moped when it is rented weekday or

  System schedule on a multiprocessor-multicore environment

This program assignment is provided to let the students understand how to the Operating Systems schedule all the processes on a multiprocessor or multicore environment.

  Java tv''s newest owner! java tv is the greatest tv channel

Java TV's newest owner! Java TV is the greatest TV channel ever, and it prides itself in its 24 hour interesting ' programming'. To help you run this channel you will need to write a  dynamic  program that uses  Data Lists  to store all its TV show i..

  Create a program that is able to learn human language

For the first programming assignment you will work with your assigned partner to create a program that is able to "learn" human language and generate new sentences in the language

  Write a while loop that lets the user enter a number

1) Write a while loop that lets the user enter a number. The number should then be multiplied by 10, and stored in a variable called product. The loop should then iterate as long as product contains a value less than 100.

  Write down ijvm code to remove top two words from stack

Write down IJVM code which will remove these top two words, multiply and put their product back on stack. You are allowed to use existing IJVM instructions only.

  General readability and understandability of java code

I need assistance in remarking the enclosed Java Code high-lighting, things like code layout, use of variable names, general readability and understandability.

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