Transcript
Page 1: Codemotion 2014 4ward time series with MongoDB

MongoDB Times Series in 4ward

Codemotion Milan November 2014Ivan Fioravanti CTO 4ward srl – www.4ward.it

Page 2: Codemotion 2014 4ward time series with MongoDB
Page 3: Codemotion 2014 4ward time series with MongoDB

https://www.4ward365.com

Page 4: Codemotion 2014 4ward time series with MongoDB
Page 5: Codemotion 2014 4ward time series with MongoDB
Page 6: Codemotion 2014 4ward time series with MongoDB

https://developer.globalblue.com

Page 7: Codemotion 2014 4ward time series with MongoDB

4ward365? Office 365 reporting!

Powered by MongoDB on Microsoft Azure

Time Series everywhere!

Page 8: Codemotion 2014 4ward time series with MongoDB

Time series?

Page 9: Codemotion 2014 4ward time series with MongoDB
Page 10: Codemotion 2014 4ward time series with MongoDB

How it works?

Page 11: Codemotion 2014 4ward time series with MongoDB

{"_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}}

)

Page 12: Codemotion 2014 4ward time series with MongoDB

{ "_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

Page 13: Codemotion 2014 4ward time series with MongoDB
Page 14: Codemotion 2014 4ward time series with MongoDB

Thanks!Ivan Fioravanti - CTO 4ward srl

[email protected]

@ivanfioravanti