3 ms·
The most interesting thing here is probably that they sometimes change their mind as to how to aggregate billing events, and used to have to manually fix the da
by tibbar 2y ago
The most interesting thing here is probably that they sometimes change their mind as to how to aggregate billing events, and used to have to manually fix the database if they changed their mind. The system they've arrived at seems to mostly handle recalculations, but they're making a pretty big assumption that you can always aggregate data on daily intervals. The day will come when they need to aggregate data over periods that are not a single day, and then they'll have to figure out what happens if they've already billed for some prior usage events when they go to re-run their automated pipeline...
- dax77 2y agoYeah, usage rating and billing systems get wildly complex. Especially when you start considering edge cases- beyond leap years and handling time zones, things like a billable event spanning days (run a few minutes just before midnight), etc.