-
Notifications
You must be signed in to change notification settings - Fork 2
Physical and network distance calculation #86
base: master
Are you sure you want to change the base?
Conversation
…to destination id in the connection list
There was a problem hiding this 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).
src/main/java/InfrastructureManager/Modules/NetworkStructure/NetworkModule.java
Outdated
Show resolved
Hide resolved
src/main/java/InfrastructureManager/Modules/NetworkStructure/Input/LocationInput.java
Outdated
Show resolved
Hide resolved
src/main/java/InfrastructureManager/Modules/NetworkStructure/Network.java
Outdated
Show resolved
Hide resolved
src/main/java/InfrastructureManager/Modules/NetworkStructure/Network.java
Outdated
Show resolved
Hide resolved
* Function to get network distance between devices or between application instances. | ||
* @param sourceId and destinationId | ||
*/ | ||
public double getNetworkDistance(String sourceId, String destinationId) { |
There was a problem hiding this comment.
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?
src/main/java/InfrastructureManager/Modules/NetworkStructure/NetworkModuleObject.java
Outdated
Show resolved
Hide resolved
src/main/java/InfrastructureManager/Modules/NetworkStructure/Output/DistanceOutput.java
Outdated
Show resolved
Hide resolved
double distance =this.network.getphysicalDistanceBetweenApplications(commandLine[2],commandLine[3]); | ||
this.getSharedDistance().putValuetoQueue(distance); | ||
} | ||
case "get_network_distance" -> { |
There was a problem hiding this comment.
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.
src/main/java/InfrastructureManager/Modules/NetworkStructure/Output/LocationOutput.java
Outdated
Show resolved
Hide resolved
src/main/java/InfrastructureManager/Modules/NetworkStructure/Shared/SharedDistance.java
Outdated
Show resolved
Hide resolved
…read write with maps
Tried to convert the Network Object to JSON file but unable to.
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