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).

  • You should mention in your question what kind of application and data you are thinking about. Do you care about a very general framework, or are you simply concerned by one particular application (and then, which one)? So please edit your question to improve it. Commented Dec 24, 2016 at 9:08
  • @BasileStarynkevitch: I did mention it, read the fine print.
    – einpoklum
    Commented Dec 24, 2016 at 9:11
  • Where is the URL linking to your application? I don't see any link to some FOSS project in your question. Commented Dec 24, 2016 at 9:14
  • @BasileStarynkevitch: There isn't one, it's not on-line. Also, I don't see why you think that would be necessary. Still, I'll edit to clarify a bit.
    – einpoklum
    Commented Dec 24, 2016 at 9:19
  • 1
    Since this is a huge undertaking, it would be important for you to get the blessings from the core developers - even if they won't be working on it, you will probably need their assistance, such as code reviews and answering questions about special cases / edge cases / grandfathered behaviors etc.
    – rwong
    Commented Dec 24, 2016 at 10:53

1 Answer 1


It is a deserialization task. Any time you retrieve data and create or initialize objects using that data, it is a type of deserialization. The more you can hide the details of the data format, the better, most likely.

That does not mean you should necessarily use Boost. The correct answer probably depends on more information than you can post here. It is too broad a question.

  • So, how do I learn from the experience of others in getting deserialization done right?
    – einpoklum
    Commented Nov 24, 2016 at 0:23
  • 1
    From what I understand, your data format and object structure is fairly simple. The only advice I can give is to write and review the documentation for your library (i.e. how to use) before you create it, and create it using as little code as possible. Commented Nov 28, 2016 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.