Skip to content

Cost calculator

Marcos Huck requested to merge feature/cost_calculation into feature/billing

Context

Cloudsim should be able to calculate costs for simulations. This process entails multiple resources that could sum up to the total cost a simulation has: A machine where to run a simulation, the storage where to upload logs, the inbound and outbound traffic on a certain network, just to name a few.

Each of these resources are created by different components in Cloudsim's platform. The machines component creates machines, the storage component uploads logs, and so on. It's worth mentioning that each of these components have different implementations depending on the cloud provider, even though we're only using AWS at the moment, we should consider supporting GCP, Azure, etc. Each provider has a different mechanism for charging for these resources.

Change

This MR introduces the concept of Cost Calculator. Cost Calculator is an interface that all components that create resources on third-party services that end up being charged could implement.

image

The Cost calculator receives a resource to which calculate costs from, and returns the rate at which the given resource should be charged for.

Other information

The AWS EC2 implementation will be added on a following MR.

Additional documentation

Edited by Marcos Huck

Merge request reports