I am developing an application architecture that allows users to add some data like reviews on some product, along with signup/signin features.
For quick insert and get i am thinking about using MongoDB, and for persistence storage (in case mongodb gets corrupt or fail) i would like to save that to a database (postgre/msql).
Also for signup/signin i would be doing the same.
I need some suggestion, at what level/layer i should save data to database? and should it be in a thread? Or am i underestimating MongoDB? is it strongly failsafe!
Thanks in advance.
Cheers
MongoDB is as (at least as) strongly failsafe as MySQL, as long as you use journalling and use your driver’s functionality for making sure your inserts and updates are committed to the journal before returning.
MongoDB leaves it up to the user to decide how important your data is, and there are various different levels:
For some more background information, have a look at http://mongly.com/Demystifying-Write-Durability/