I'm working on this project which, for certain reasons, will need to read the data that's persisted by a DBMS (*). The data is not serialized objects with class information, representation of pointers etc, it's much more "plain": Mostly arrays of integers or floats, and a more involved persistence scheme for strings and binary blobs. It's situated in a directory on disk with multiple files in it. My project is in C++ and that's the language I'll use to do the loading (the DBMS is not written in C++, although it might have been; the persistence has no "language affinity").
Now, I could just write some quick and (kind of) dirty code for my specific retrieval needs; but I was thinking of writing a stand-alone and flexible library - which would then allow for a lightweight utility for inspecting/peeking into the persisted data, or exporting data in another format, without bringing up the entire original app.
Since I haven't written this kind of a library before (I have released some FOSS, but not of this kind), I was hoping to get some advice regarding how to approach this work; how to make the library interface as intuitive and straightforward as possible; and following the best/better practices of other library code of this kind.
Also, more specifically, I know that Boost (and in the future, the C++ standard) have a serialization component, and one could look at what I'm doing as a kind of selective de-serialization - albeit a simplistic one, since there isn't any complex class structure which needs to be reconstructed, pointers etc. Should I be thinking about this task as de-serialization, or would that not be a helpful model?
- It's a FOSS application and it's going to be a FOSS library, so licensing is not an issue and so is access to the source code.
- I'm in touch with the core developers, but this kind of work is not a priority for them, so they won't be participating.
(*) - It's MonetDB and the persisted data are essentially the table columns (and some meta-data about them). The format is not well-documented (actually, not documented at all except via the source).