node.js - Saving time series data in MongoDB and Mongoose -


i using node.js, mongodb , mongoose , trying store real time data. want store data different intervals. example 0.1 hz 30 hz. idea have 2d array minutes , seconds, , every element array again can store many values wants. (30 30 hz) using this approach mongoose scheme looks following:

var sometestschema = new schema({   datatype: number, // identifier   data: [     {       minute: number,       values: [         {           second: number,           values: [             {               timestamp: date,               value: string,             }           ]         }       ],     },   ], 

first of all, not sure if did schema right , how model array indexes.

second, how store data using mongoose now?

do have hardcode "minutes" , "seconds" array?

thanks help!


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo