Java-RMI-Assignment 2- Distributed Systems Solved

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

Assignment 2
Distributed Systems

2 Problem
For this assignment, you will be using RMI(Remote Method Invocation) in Java to implement a simple single server architecture with support for multiple clients. The details are as follows:
• The server maintains a list of graphs each associated with a distinct identifier. • Clients can request to add a new graph, update an existing graph and query for the total weight of the minimum weight spanning tree of a given graph. • Clients can request to add a new graph using ‘add graph 〈graph identifier〉 n’. This command will add a new graph on the server with the identifier graph identifier and n number of nodes. The graph identifier is a string with a maximum length of 10 and it won’t already exist. n will be in the range: 1 <= n <= 100,000. • Clients can request to add a new edge in a graph using ‘add edge 〈graph identifier〉 〈u〉 〈v〉 〈w〉’. This will add an undirected edge between the nodes u and v with weight w. u and v are the node numbers of the endpoints of the edge such that 1 <= u,v <= n and 0 <= w <= 10,000. n is the number of nodes in the specified graph. A graph with identifier graph identifier will already exist. There can be multiple edges and self-loops added to the graph.
1
• Clients can request for the total weight of the minimum weight spanning tree in a graph from the server using ‘get mst 〈graph identifier〉’. The client will print the solution the server returns. In case the graph does not have a spanning tree, -1 should be printed. A graph with identifier graph identifier will already exist. • All values should fit in 32-bit signed integers. • The server should be able to handle multiple clients simultaneously and should also work with clients on other machines. • You are free to use any algorithm for MST.

  • Java-RMI--6amw1p.zip