Click here to Skip to main content
15,889,281 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
Questionhave u solved the code? Pin
chitaranjan pradhan8-Jan-18 8:54
chitaranjan pradhan8-Jan-18 8:54 
AnswerRe: have u solved the code? Pin
Pete O'Hanlon8-Jan-18 9:11
mvePete O'Hanlon8-Jan-18 9:11 
GeneralRe: have u solved the code? Pin
jschell20-Jan-18 5:56
jschell20-Jan-18 5:56 
QuestionAzure Pin
Mycroft Holmes29-Dec-17 20:18
professionalMycroft Holmes29-Dec-17 20:18 
AnswerRe: Azure Pin
Gerry Schmitz30-Dec-17 6:28
mveGerry Schmitz30-Dec-17 6:28 
GeneralRe: Azure Pin
Mycroft Holmes30-Dec-17 13:47
professionalMycroft Holmes30-Dec-17 13:47 
QuestionCredential stuffing / Passing Auth cookie to current user Pin
SEJohnson9-Dec-17 5:00
SEJohnson9-Dec-17 5:00 
QuestionJSON size Pin
Eytukan28-Nov-17 21:07
Eytukan28-Nov-17 21:07 
I have these options =
A. Store more data into one single JSON document
Or
B. Distribute them as multiple documents

Storing data in one single doc, gives a neat solution, but I'm not sure how big is too big for a JSON document. What if it runs to 40-50 MB? Parsing docs of this size feels insane?

UPDATED:

This document works like an accumulator. For example, lets assume a requirement like this :
I need to store all the users taking part in discussions in CodeProject.
So, I need to capture the User ID & have a counter against each of them.

{User:1332,
PostCount:23, (incremented every time he posts a reply)
},
{User:1124,
PostCount:56,
},
{User:2323
PostCount:34
}

The document keeps growing as and when new users start posting in CP.
The document gets updated for the count, when old users make another post.
The document is read when the user metrics are needed to be shown on reports.

Now I have the option to maintain it- Yearly, Monthly or weekly OR just Keep it as a single document. Where all the users activities would be recorded in a single doc.

If you are dividing the document as Yearly, Monthly,weekly etc, The document size would be reasonable- Somewhere around <4-5MB (Monthly), but the no. of document would be more in the collection. You'll have to run an aggregate function to collect all the data & calculate the Count that's spread across documents for every user and produce the metrics. As I just said, Here the individual documents size would be reasonable as it can't go on increasing. It just bound by the start & end date.

And Single document means, Keeping everything in single file and keep updating it.
For calcs, Load the whole data in memory, run the aggregate function to parse through the document and produce the metrics.

(Single Document sounds like a Big-Fat approach. I think I'd rather keep them as monthly chunks and make it handy to handle the documents.)

Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy Falcon.


modified 1-Dec-17 5:28am.

AnswerRe: JSON size Pin
Eddy Vluggen29-Nov-17 0:58
professionalEddy Vluggen29-Nov-17 0:58 
GeneralRe: JSON size Pin
Eytukan29-Nov-17 22:14
Eytukan29-Nov-17 22:14 
GeneralRe: JSON size Pin
Eddy Vluggen30-Nov-17 1:12
professionalEddy Vluggen30-Nov-17 1:12 
GeneralRe: JSON size Pin
Eytukan30-Nov-17 20:29
Eytukan30-Nov-17 20:29 
AnswerRe: JSON size Pin
Gerry Schmitz30-Nov-17 5:25
mveGerry Schmitz30-Nov-17 5:25 
GeneralRe: JSON size Pin
Eddy Vluggen30-Nov-17 8:16
professionalEddy Vluggen30-Nov-17 8:16 
GeneralRe: JSON size Pin
Gerry Schmitz30-Nov-17 9:19
mveGerry Schmitz30-Nov-17 9:19 
GeneralRe: JSON size Pin
Eddy Vluggen30-Nov-17 9:32
professionalEddy Vluggen30-Nov-17 9:32 
GeneralRe: JSON size Pin
Gerry Schmitz30-Nov-17 12:02
mveGerry Schmitz30-Nov-17 12:02 
GeneralRe: JSON size Pin
Pete O'Hanlon30-Nov-17 21:14
mvePete O'Hanlon30-Nov-17 21:14 
GeneralRe: JSON size Pin
Gerry Schmitz30-Nov-17 21:40
mveGerry Schmitz30-Nov-17 21:40 
GeneralRe: JSON size Pin
Eddy Vluggen1-Dec-17 0:59
professionalEddy Vluggen1-Dec-17 0:59 
GeneralRe: JSON size Pin
Gerry Schmitz2-Dec-17 3:49
mveGerry Schmitz2-Dec-17 3:49 
GeneralRe: JSON size Pin
Eddy Vluggen2-Dec-17 4:09
professionalEddy Vluggen2-Dec-17 4:09 
GeneralRe: JSON size Pin
Gerry Schmitz2-Dec-17 4:32
mveGerry Schmitz2-Dec-17 4:32 
GeneralRe: JSON size Pin
Eddy Vluggen2-Dec-17 6:43
professionalEddy Vluggen2-Dec-17 6:43 
GeneralRe: JSON size Pin
Gerry Schmitz2-Dec-17 8:44
mveGerry Schmitz2-Dec-17 8:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.