Pay-As-You-Go Pricing Solutions
SaaS (Software as a Service) is taking over the cloud computing market. It offers pay-as-you-go pricing models that enable customers to pay only for what they use. Here is an example of pricing rules when your monthly bill is determined by the number of units (e.g. executed transactions) you actually use by tiers:
|Free Tier||The first 10,000 units are free||$0 / unit|
|Tier 1||Up to 20,000 units per month||$0.050 / unit|
|Tier 2||From 20,000 to 50,000 units per month||$0.030 / unit|
|Tier 3||Above 50,000 units per month||$0.010 / unit|
Now assume that you are a vendor of a SaaS product that needs to report the actual use of your product to the cloud provider in accordance with the above rules. For example, AWS requires each SaaS vendor to accumulate the actual use per customer and report the charged amount to the AWS metering system every hour by tiers. So, you need to create a pricing decision service that implements these rules. Your service will be called at the beginning of each hour and will receive 3 parameters:
- Number of all used units (from the very first use until the last hour including)
- Number of units used this month (the last hour including)
- Number of units used the last hour.
Your pricing service should produce the numbers of charged units for Tier 1, Tier 2, and Tier 3 for the last hour. Here are examples:
|All units||This month units||Last hour units||Tier 1||Tier 2||Tier 3|
We challenge you to implement this decision service with your favorite tool, test it (!), and submit your solutions with execution results to DecisionManagementCommunity@gmail.com.