Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Physical and network distance calculation #86

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lkh5kor
Copy link
Collaborator

@lkh5kor lkh5kor commented Feb 5, 2021

Physical distance calculation computation
Get location of a device or application instance implemented
Modified few getter functions in network class
Network distance draft implementation

Pending:
network distance computation.
input and output module functions

@lkh5kor lkh5kor self-assigned this Feb 5, 2021
@alyhasansakr alyhasansakr linked an issue Feb 5, 2021 that may be closed by this pull request
@lkh5kor lkh5kor requested a review from alyhasansakr February 17, 2021 13:46
Copy link
Collaborator

@alyhasansakr alyhasansakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all the unnecessary spaces and tabs.
In general I dislike the way we implement the getters for the Network class. You should be able to index through the lists rather than doing a linear search every time a piece of information is needed. Each instance (device, location and so on) must have a unique ID and thus could be indexed (normally using a HashMap).

* Function to get network distance between devices or between application instances.
* @param sourceId and destinationId
*/
public double getNetworkDistance(String sourceId, String destinationId) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have helped me a lot if you had some explanation written of how this is supposed to provide the network distance. I don't understand how it works?

double distance =this.network.getphysicalDistanceBetweenApplications(commandLine[2],commandLine[3]);
this.getSharedDistance().putValuetoQueue(distance);
}
case "get_network_distance" -> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Network distance could also be for devices and applications.

lkh5kor and others added 2 commits February 24, 2021 21:27
Tried to convert the Network Object to JSON file but unable to.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Location Functionality
2 participants