How to store and retrieve time series using google appengine using python

913 views Asked by At

We are developing a tool to share case studies for a specific vertical.

  1. We would like to store the amount of time people watch a case study (time series)
  2. We would like to display analytics the same way as Google Analytics does on its home page (see the attached file)

Google Analytics, default dashboard

The data model is simple:

from google.appengine.ext import ndb
from webapp2_extras.appengine.auth.models import User

class CaseStudy(ndb.Model):
    title = ndb.StringProperty()
    published  = ndb.BooleanProperty( default=False)

class Hits(ndb.Model):
    case_study = ndb.StructuredProperty(CaseStudy, repeated=False)
    by_whom = ndb.StructuredProperty(User, repeated=False)
    timestamp = DateTimeProperty(auto_now_add=True)
  1. We want to use one of those components: Google AppEngine, NDB, BigTable, MapReduce, Python
  2. we want to display time series to the owner of the case study
  3. We would like to avoid using D3js (too complicate?))
  4. we want to use Morris to display those time series http://morrisjs.github.io/morris.js/

Questions

  1. How to design the architecture to store the data? NDB or something else?
  2. How to design the architecture to aggregate the data?
  3. How to design the architecture to display the data?
  4. Do we need to integrate http://Goo.Gl ?

Thank you in advance and any advice is welcomed

1

There are 1 answers

4
ZiglioUK On BEST ANSWER

Avoid the Datastore altogether (BigTable), too expensive and slow. Look at this project. Big Query could be what you need.