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

  Write a statement that writes both of their values

Given an interger variable i and floating-point variable f, write a statement that writes both of their values to standard output in the following format: i=value-of-i f=value-of-f.

  Assignment related to java programming

Question 1: Write a java program to compute the squares of the numbers in the array list like 1, 2, 3, 4... up to 50. Question 2: Write a java program to compute the sum of numbers and average in the array list up to 50.

  Reverses the bytes of a file

Write a program that reverses the bytes of a file, so that the last byte is now first andthe first byte is now last. It must work with an arbitrarily long file, but try to make itreasonably efficient.

  Design a class named linearequation

(Algebra: 2 X 2 linear equations) Design a class named LinearEquation for a 2 X 2 system of linear equations.

  Create the class airplane

Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):

  Create a netbeans java project

Create a NetBeans java project, add the jar file "stdlib-package.jar". The "Picture" class in this package can read and show digital image files.

  Define a method for linkedbag

Add a constructor to the class LinkedBag that creates a bag from a given array of entries - define a method for LinkedBag that removes a random entry from the bag.

  Returns the object with the largest measure

public static Measurable maximum(Measurable[] objects)that returns the object with the largest measure. Use that method to determine the country with the largest area from an array of

  Insert uml design diagrams, use case, classes

Insert UML design diagrams here (use case, class, and sequence diagram).

  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

  Write a java sorting application with two classes

Write a Java Sorting Application with two classes, JavaSort and JavaSortTest. Your JavaSort Class, as a minimum must contain sorting methods for BubbleSort, InsertionSort, ShellSort, MergeSort, and QuickSort.

  Create an artificial life environment

Create an artificial life environment. You should have at least three types of agents: Herbivore, Carnivore, Plant

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