I have a n-ary tree data structure with a specific set of classes. The data structure goes through a set of transformations say 1 to n. At the end of the above transformations, the final tree is the output result which gets used to retrieve information.
Is there a way that I can (binary) dump the tree after every correct transformation. The dump will reflect the state of the tree after the previous transformation. Thus, if any transformation goes wrong, I can restore the dump in memory w/o going through the correct transformation again. It's similar to the Checkpoint functionality that GDB provides to save the snapshot of the program's state.
- I looked at NoSQL databases like MongoDB, CouchDB, Redis etc but they are primarily key-value datastores(Redis) or store the information in document-type structure w/o storing the associations/relationships between the nodes in a tree(MongoDB).
- I also looked at Neo4j graph database, which is a great tool for representing graph-like structures.
Redis-dump, Neo4j-dump and MongoDB-dump are available but I am not able to decide which one to pick among these. Which of the above would be easier to populate as the dump creation and restore time should not be large.
I wanted to know the opinion and feedback from fellow programmers who have faced this problem and how did they solve it. What would be the best way of doing this?
P.S. My existing implementation is in C++. Let me know if anything is unclear and I'll try to explain it in a better way.