[abacus] Accepting delayed usage within a slack window

Benjamin Cheng

One of the things that need to be supported in abacus is the handling of delayed usage submissions within a particular slack window after the usage has happened. For example, given a slack window of 48 hours, a service provider will be able to submit usage back to September 30th on October 2nd.

An idea that we were discussing about for this was augmenting the quantity from an array of numbers/objects to an array of arrays of numbers/objects and using an environmental variable that is currently going to be called SLACK to hold the configuration of the slack window. SLACK would follow a format of [0-9]+[YMDhms] with the width of the slack window and to what precision the slack window should be maintained. 2D and 48h both are the same time, but 48h will keep track of the history to the hour level while 2D will only keep it to the day level. If this environment variable isn't configured, the current idea is to have no slack window as the default.

The general formula for the length of each array in a time window would be as follows: 1(This is for usage covered in the current window) + (number of windows to cover the configured slack window for the particular time window).
IE: Given a slack of 48h. The year time window would be 1 + 1. Month would be 1 + 1. Day would be 1 + 2. Hours would be 1 + 48. Minutes/Seconds would stay at 1.

Thoughts on this idea?

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.