Non-intrusive object serialization

Discussion in 'C++' started by Sabyasachi Basu, Mar 7, 2004.

  1. Most C++ object serialization techniques are intrusive, that is they
    require all serializable classes need to have functions to stream in
    and stream out their contents.

    I came across "non-intrusive serialization" while going through the
    tutorial on Robert Ramey's serialization library for Boost. However,
    it is not clear to me how to implement serialization without the
    cooperation of the classes being serialized.

    Can someone through some light on this concept?

    Thanks in advance.
    Sabyasachi
    Sabyasachi Basu, Mar 7, 2004
    #1
    1. Advertising

  2. "Sabyasachi Basu" <> wrote
    > Most C++ object serialization techniques are intrusive, that is they
    > require all serializable classes need to have functions to stream in
    > and stream out their contents.
    >
    > I came across "non-intrusive serialization" while going through the
    > tutorial on Robert Ramey's serialization library for Boost. However,
    > it is not clear to me how to implement serialization without the
    > cooperation of the classes being serialized.
    >
    > Can someone through some light on this concept?


    By "non-intrusive", he means that the coupling of the class to be serialized and
    the serialization mechanism is done by a third entity. This third entity is
    created with the knowledge of how to extract and reconstitute another object's
    data. Ramey's serialization library simplifies the specification of this third
    entity.

    Design-wise, this external coordinator is the cleanest approach, but it suffers
    from redundancy and any changes to the class being persisted must be reflected
    in the serialization helper. The only way to avoid this is to have a
    preprocessor that generates the helper classes, and if you've ever dealt with
    ODMG or even CORBA, you're probably cringing.

    Claudio Puviani
    Claudio Puviani, Mar 7, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marcin Kalicinski

    Intrusive list

    Marcin Kalicinski, May 17, 2004, in forum: C++
    Replies:
    9
    Views:
    3,272
    Peter Koch Larsen
    May 18, 2004
  2. Replies:
    3
    Views:
    1,023
  3. Charles Hartman

    intrusive posts

    Charles Hartman, Mar 24, 2005, in forum: Python
    Replies:
    0
    Views:
    316
    Charles Hartman
    Mar 24, 2005
  4. Dimitri Ognibene
    Replies:
    4
    Views:
    776
    Dimitri Ognibene
    Sep 2, 2006
  5. Pradeep

    Intrusive pointer problem

    Pradeep, Oct 5, 2005, in forum: C++
    Replies:
    6
    Views:
    550
    Maxim Yegorushkin
    Oct 5, 2005
Loading...

Share This Page