[abacus]Reporting Query

Benjamin Cheng

In abacus, a user can get a report for an organization while passing a timestamp. This is done via a descending query with the given timestamp as the beginning and the beginning of the previous year is the end. This ensures that the report will have usage data for up to the previous year for the given organization. This query used to only look for the current day until time windows support was recently added.

With time windows, each record has information of usage accumulated/aggregated/rated to the last second/minute/hour/day/month/year/forever in sync with the document's end time. Choosing to query up to the beginning of the previous year was a choice based upon allowing the user to know usage up to the previous year for any given timestamp.

Here are a couple of questions I have regarding this:
- In addition to partitioning by bucketing, abacus partitions by period in terms of month for its databases. Therefore, each month with usage would have its own set of databases with a minimum of 1. In the worst condition(assuming only 1 database per month), that is possibly 24 databases (ie: 2014-01 to 2015-12) that the report would have to search for the last usage of an organization. Does it make sense to have to look through all of those databases if the organization hasn't had usage in the past 3 years for instance?
- In terms of report, does it make sense to return the latest record within the past year? For example, say a user queried the monthly or yearly usage for an organization in 2015-10, but the last time the organization had any usage was 2014-04. Does it make sense to return 2014-04 to the user or would it better to inform the user that there is no usage within the specific time range? I guess in a way, this is asking what a report should entail that would make the information useful to the user.


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