Friday 21 April 2017

NodeJS, Mongo : Sending and storing json as a field for every user

I am using node.js server with mongodb as a database.
Every signed-up User will have one long JSON string (about 500 to 2000 character long ) along with their credentials. That will be send to server through post request.
I'm thinking that storing raw JSON string in database might overwhelm server so, one option I can think of is, uploading JSON as a file on Amazon S3 and storing the link but I'm open for all opinions! So my questions are;
1- what is the best way of storing long JSON file/string for each signed-up user? ( in mongo Users collection )
2-How do you think should I send JSON in request as a string in a field or binary?

Thanks



via Burkay Ozdemir

No comments:

Post a Comment