Using NetworkCloudlets together with a custom VMMapper

21 views
Skip to first unread message

Lennart Demes

unread,
Nov 10, 2022, 4:25:40 AM11/10/22
to CloudSim Plus: Cloud Simulation Framework
Hello everyone,

I am trying to simulate the interactions of a simple Kubernetes application with containers for frontend, backend and database. Modeling the flow of information using the features of NetworkCloudSim which are included in CloudSimPlus seems doable. Every container is represented by one cloudlet which has several tasks. With that the plan is to build a chain like Client -> Frontend -> Backend -> Database (and back) where every cloudlet has a task for processing and requesting data from the next element in line.

However I realized that this doesn't play nicely when trying to use a custom VMMapper function (setVMMapper) with the broker because every cloudlet needs to have its VM assigned to it before the packets are defined. Has someone else already tried something in this direction and maybe found workaround to allow the dynamic allocation of Cloudlets to VMs while retaining the ability to send packets between them?

Prof. Manoel Campos

unread,
Nov 16, 2022, 7:52:31 AM11/16/22
to clouds...@googlegroups.com
Hello Lennart,

A cloudlet needs to be linked to a VM when trying to attach packets since we need to get source and target information.
And in practice, you can't send packets before the application is already running.
In order to achieve what you want, you can use the cloudlet.addOnStartListener().
This listener is called every time a Cloudlet starts executing into some VM.
Check the NetworkVmsExampleSimpleApp.
You could change/extend the createNetworkCloudlets method adding something such as:

sourceCloudlet.addOnStartListener(evt -> addSendTask(sourceCloudlet, destinationCloudlet));

That will add a sendTask  to some sourceCloudlet after it starts executing into some VM.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

Professor at Federal Institute of Education, Science and Technology of Tocantins (Brazil)

http://manoelcampos.com


 about.me


--
If you received an answer that worked for you, please be kind and reply to let everybody knows it worked.
http://cloudsimplus.org
---
You received this message because you are subscribed to the Google Groups "CloudSim Plus: Cloud Simulation Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsimplus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudsimplus/676080cb-89f8-438a-ab90-5c755d8a9421n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages