New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Network module #49

Closed
manoelcampos opened this Issue Dec 22, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@manoelcampos
Owner

manoelcampos commented Dec 22, 2016

ISSUE:

  • Network examples stay in infinite loop.
  • The packets sent are not delivered and the same packets are sent multiple times.
  • The Switch classes yet have a lot of duplicated code.
  • There is lots of redundant maps, such as a map of VMs to Hosts and a map of VMs to Switches. Such data can now be got directly from the VM using vm.getHost() and vm.getHost().getEdgeSwitch().

If it is a more wide problem or you don't know where it happens, provide a minimal simulation example that reproduce the problem

Examples are provided in the org.cloudsim.examples.network package inside the examples project.

Specifications like the version of the project, operating system or workload file used

Current CloudSim Plus development version.

@manoelcampos manoelcampos added this to the CloudSim Plus 1.0 milestone Dec 22, 2016

@manoelcampos manoelcampos self-assigned this Dec 22, 2016

manoelcampos added a commit that referenced this issue Jan 4, 2017

Closes #49
- Fixed the infinite loop in network examples. The problem was caused because a sent packet was not being removed after it was in fact sent.
- When there were multiple tasks to be executed, after a task finished, the next task execution was not being scheduled
  automatically. If the next task was a CloudletExecutionTask, the task execution time was wrong.
  A VM_UPDATE_CLOUDLET_PROCESSING_EVENT event was sent to fix this issue.
- The number of executed instructions computed by the method CloudletSchedulerAbstract.cloudletExecutedLengthForElapsedTime
  was considering the execution instructions across all PEs, while the Cloudlet.finishedSoFar attribute just
  considers the executed length for a single PE, since all PEs will execute the same length.
  This was also causing the issue above for CloudletExecutionTasks.
- Switch classes were refactored to remove code duplication and redundant attributes such as some HashMaps.
- Some TODOs were fixed.
- The network module and examples have been updated along the time and they were almost remade due to huge amount of design issues and extremely large code duplication.
- The examples were simply not usable and understandable. They were completely redesigned to eliminate redundant code and to make them in fact useful.
- Packet classes didn't provide a class hierarchy and strongly relied on IDs instead of using entire objects such as  Host, Vm and Cloudlet. The name of classes and attributes causes lots of confusions because it was not clear if a given ID was related to a Vm or Host, for instance.
- Switch classes had critical issues such as one class being an entire copy of another one and even the existence of public attributes instead of private ones with getters and setters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment