cassandra for all the things
TRANSCRIPT
visitor IDtimestamp timestamp timestamp
event event event
visitor IDtimestamp timestamp timestamp
event event event
visitor IDtimestamp timestamp timestamp
event event event
visitor IDtimestamp timestamp timestamp
event event event
visitor IDtimestamp timestamp timestamp
event event event
➔
@iconara
SELECT category, author, device_type, COUNT(*) AS pageviews, AVG(duration) AS duration FROM pageviews GROUP BY 1, 2, 3
@iconara
SELECT category, author, device_type, COUNT(*) AS pageviews, AVG(duration) AS duration FROM pageviews GROUP BY 1, 2, 3
@iconara
SELECT category, author, device_type, COUNT(*) AS pageviews, AVG(duration) AS duration FROM pageviews GROUP BY 1, 2, 3
date + cubeslice + time slice + time slice + time
metrics metrics metrics
“sports”, “Sue”, “tablet”
category, author, device type
date + cubeslice + time slice + time slice + time
metrics metrics metrics
{pageviews: 234, duration: 2451.45}
cube + slice + epoch + metric
time + version time + version time + version
value value value
cube + epochslice slice slice
time/1000
SELECT category, device_type, COUNT(*) AS pageviews, AVG(duration) AS duration FROM pageviews WHERE category = “sports” GROUP BY 1, 2, 3
category + device type
culture + computer
culture + tablet
news + computer
news + tablet
news + mobile
sports + computer
sports + tablet
sports + mobile
category + device type
culture + computer
culture + tablet
news + computer
news + tablet
news + mobile
sports + computer
sports + tablet
sports + mobile
device type + category
computer + culture
computer + news
computer + sports
mobile + news
mobile + sports
tablet + culture
tablet + news
tablet + sports
supports wildcard on category
supports wildcard on device type
session IDtimestamp timestamp timestamp
data data data
shardsession ID session ID session ID
H(session ID) mod 360
shard 9NFNJ0U NFNJ13 NFNJ0Y NFNJ1L NFNJ16 NFNJ0U NFNJ1C NFNJ20 NFNJ0U NFNJ2L NFNJ2S NFNJ2D NFNJ2U NFNJ1X NFNJ4C NFNJ1O NFNJ1A NFNJ29× × × × × × × × × × × × × × × ×
session IDtimestamp timestamp timestamp
data data data
shard + slotsession ID session ID session ID
day-of-year mod 30
shard 9 slot 3
NFNJ6Z NFNJ73 NFNJ7B NFNJ72 NFNJ7N NFNJ74 NFNJ6Z NFNJ8C NFNJ7N NFNJ88 NFNJ83 NFNJ94 NFNJ8Z NFNJ7P NFNJA3× × × × × ×shard 9 slot 2
NFNJ58 NFNJ5H NFNJ5C NFNJ5E NFNJ68 NFNJ6H NFNJ68 NFNJ5M NFNJ64 NFNJ6H NFNJ6C NFNJ5U NFNJ5K NFNJ84 NFNJ7Y NFNJ62 NFNJ70 NFNJ74 NFNJ6Q× × × × × × × × × × × × × × × ×shard 9 slot 1
× × ×