How to structure Google Datastore (App Engine) web traffic model?
Simple Task: keep track of web traffic (hits) so that I can graph the number of hits per day for the last 30 days.
Current Datastore Model (2 fields): 1) Website ID 2) Timestamp of Hit
Problem: I'm using Google App Engine's datastore and don't have the ability to do a group-by or count.
Can anyone offer a simple way to structure my Google Datastore database to achieve this task? By returning开发者_如何学C all of the hits and then grouping them in my code seems like a performance hog. Any ideas?
I would use sharding counters for this specific task; have a look to the last example of this documentation.
精彩评论