I've refactored a program to remove its dependency on an sql database by storing all the state in a memory model. However the manager liked the ability to easily inspect the domain state just by doing an sql join/filter on the database at any time; and he wishes to maintain some similar domain inspection ability. We discussed having a call that dumps the model state to a file that can be inspected. There isn't that much state--it can all fit into memory--but the state is large enough that we need some mechanism to allow us to 'fetch' the child if a given parent better then manual inspection of the files.
I need the best tool to make this doable. They are thinking of exporting everything to CSV to be read into a DB, which could work, but it seems off to be using a DB only for doing joins on data types. Plus, their old approach used Strings for joins that weren't guaranteed to be unique, and, with my addition of extra objects, thought would have to put into how to lay out the database fields to represent the new model objects (particularly child objects of parents).
I've toyed with other ideas for this. One idea was to a CSV file and having some other program read in the CSV file and do 'sql like' joins, but haven't found a program that does this easily. I've also toyed with an interactive java interpreter so we can read things into our model and do calls against the model, even using linux base commands to write 'joins' with awk or similar. I'm not sure I like any option though. Does anyone have suggestions for a good way of doing this?
p.s. We can SSH to the maintained systems at any time, but we can't copy files to or from them without permission when maintaining live systems. Any tool used to inspect memory has to be packaged with our release as its own jar with justification as to why we are including it.