Introduction

A lot of data comes in the form of time-series, and while usually they're easy to manipulate, the process can become tricky. Here TimEL comes to help!

Indeed TimEL is a good fit to solve various time-series problems, mainly the metering and billing ones (that's where it originates from).

Now let's image an hypothetical scenario to see how TimEL could help. Let's say you're implementing a next killer web game where you get a point for each rescued kitten. Now you want to reward your most loyal players with an in game bonus based on the achieved score.

More specifically, imagine that for each player session your backend system logs hourly the user session length (rounded hourly) and the relative score totalled during the session.

It might happen that sometimes a user session is still open, so in such a case the backend will emit a single entry covering more than 1 hour when the session is complete.

Now imagine we have two players, A and B, with the following scores:

At 9:00, player A started to play and stopped at 11, scoring 36 points - so your backend logged 36 points in between 9:00 and 11:00. Player B started one hour later, and played only for one hour (scoring 20 points).

Now let's imagine that we want to compute the total score achieved by A and B together, every hour.

What would be the score in between 9:00 and 10:00 ? Well, it would be only A's one, but we have to consider that he saved 36 kittens for a 2 hours period.

Without more data, we can assume that if he saved 36 kittens in 2 hours, he saved 18 each hour. So we can say that between 09:00 and 11:00, 18 kittens were saved. One hour later 38 kittens were saved (18 by A, and 20 by B)!

And that's what TimEL will automatically do, because we feed it using an Integral variable.

  • introduction.txt
  • Last modified: 2019/05/09 16:39
  • by admin