Streamdrill examples: e-commerce trending

Thursday, August 29, 2013

Talking with people we realized that they find it hard to wrap their heads around what you could do with streamdrill and how you would do it. So we thought we start putting a few examples up here to give you an idea where you could use streamdrill. We’re seeing such opportunities daily, and of course we’d like to get you to the same point ;)

Consider a simple web shop site (not necessarily written in php as indicated in the image below). You want some basic trending on the stuff people are looking at and buying. It generates two kinds of events: views and purchases. We can put a bit more structure in there like categories or makers to be able to drill down on the results later.

You pipe all the relations you are interested in to streamdrill. In the current version where everything is still pretty raw and basic, you’d need to do this by hand. For example, you define the following trends:

  • A full trend which gets the raw events: (type, category, maker, item, price)
  • Trends for (type, category), (type, maker), to directly get aggregates for the categories and makers for views and purchases.
  • Possibly a two versions of each trend, one where you just count occurrences and one where you put in the price to get in the aggregate revenue earned for a segment or price.

From that you get two things:

The individual activity over the last hour, day, or week so that you can compare categories, makers, and items against one another.

Instant trends showing which are the top categories, makers, and items by views, purchases, and revenue, with the ability to drill down items by maker, and categories and so on.

You could also do this kind of analysis with batch SQL SELECT count(*) statements running every few minutes, but you probably don’t want to run this on the main database which you also use for storing your transactions (depending on your output, these select statements might take quite some time). Instead, you set up streamdrill once and then pipe the relevant relations into it. Go to streamdrill.com and have a look at the demo!

Posted by Mikio L. Braun and Leo Jugel at 2013-08-29 16:15:00 +0000

blog comments powered by Disqus