Here is my use-case.
Now I would like to hear some advice on whether I should use XML or MongoDB. My Concerns :
I can't use any other DB than MongoDB, as some persistent operations are still done on MongoDB.
Thanks in advance.
You are most likely better off using MongoDB to handle your session data. There should be no problem in creating and removing objects based on session starting or session ending. You will be taking advantage of the high performance MongoDB which will give you scalability to grow over time.
Depending on your language of choice, (I use C#) you might get the ability to serialize Json into an object without any performance penalty. The C# driver for example, handles the serialization for you, so every object you retrieve from Mongo will be automatically represented as a C# object. The same way you can populate your C# object and store it in the database, all handled by the driver.
If you manage your data through objects to serialize/deserialize to and from mongodb, you can actually serialize/deserialize to XML as well. So the same objects you use for Mongo can be used to manage your xml.
So to answer your questions:
How good is it to store temporary data in MongoDB and delete/take backup once done with session? Should be as suitable as any other database. Definitely better than storing data in XML files on the server.
Conversion from MongoDB json format to XML. Depending on your mongodb driver, you can use objects and serialize/deserialize to mongodb and xml at the same time, making your conversion from xml to mongodb back and forth very easy.
Handling the changes in the schema design. Mongo is schema-less because it uses documents instead of tables. Any change in the document structure will be handled by mongoDB since there is no schema like in a relational database.
I hope this makes some sense.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.