codemotion 2014 4ward time series with mongodb
DESCRIPTION
My presentation for Codemotion 2014 4ward time series in the real world with MongoDB. Real usage of time series on Globalblue API portal and 4ward365 reporting for Office 365.TRANSCRIPT
MongoDB Times Series in 4ward
Codemotion Milan November 2014Ivan Fioravanti CTO 4ward srl – www.4ward.it
https://www.4ward365.com
https://developer.globalblue.com
4ward365? Office 365 reporting!
Powered by MongoDB on Microsoft Azure
Time Series everywhere!
Time series?
How it works?
{"_id" : "201411/apikey1/forms/calculaterefund",
"daily" : {“1” : 2368, “2” : 3514, …, “28” : 2833}
"metadata" : {
"date" : ISODate("2014-11-01T00:00:00Z"),
"apikey" : “apikey1",
"api" : "forms",
"method" : "calculaterefund"
}
}
Monthly Collection Document Design
FAST UPDATE WITH
$INC OR $SET
db.monthlystats.update(
{ _id : " 201411/apikey1/forms/calculaterefund"},
{$inc : {"daily.30" : 1}}
)
{ "_id" : " 201411/apikey1/forms/calculaterefund ",
"hourly" : {"00" : 3, “01” : 5, …, “23” : 15},
"minute" : {
"00" : {“05" : 3, “09” : 5,.. “35”: 20},
"01" : {“15" : 1, “27” : 1,.. “44”: 33},
…,
“23” : {“10" : 2, “15” : 3,.. “49”: 20}
},
"metadata" : {
…
}
}
Daily Collection Document Design