Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE JAVA CODE FOR SOLUTION PLEASE write a program that is able to find the optimal allocation of fragment replicas to sites in a distributed

USE JAVA CODE FOR SOLUTION PLEASE

write a program that is able to find the optimal allocation of fragment replicas to sites in a distributed database.

The program will read and parameter file which defines necessary parameter to decide how each fragment will be access in term of the expected cost of query and update, expected probability of query and update to each fragment.

the # indicates the comments of each parameter.

Your program should be able to find and print optimal allocation for each fragment and display the overall cost of all possible replication as well. The optimal replication which is the lowest cost among all should be also printed. The sample input file looks like below:

#Total number of fragment 3

#Expected cost of a remote query to fragment i. 1.0, 1.0, 1.3

#Expected cost of a remote update to fragment i. 1.2, 1.5, 2.0 #Number of sites 4

#Expected probability that fragment i is queried by site j.

1.0, 1.0, 0.4, 0.0

0.0, 0.4, 0.7, 1.0

0.0, 1.0, 1.0, 0.0

#Expected probability that fragment i is updated by site j.

0.6, 0.4, 0.0, 0.0

0.0, 0.0, 0.4, 0.6

0.0, 0.5, 0.5, 0.0

image text in transcribed

The sample partial output of the program Number of sites: 4 Computing optimal allocation for fragment 0 x=[0,0,0,0], exptected cost =2.4 x=[1,0,0,0], exptected cost =1.88 x=[0,1,0,0], exptected cost =2.12 Fragment 0: Optimal Replication =[1,1,0,0], min Cost =1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

4. EMC Corporation

Answered: 1 week ago

Question

6. Vanguard

Answered: 1 week ago