On 8/7/2011 2:27 PM, Jacob Carlborg wrote:
On 2011-08-07 17:45, dsimcha wrote:
On 8/7/2011 11:36 AM, Jacob Carlborg wrote:
Currently, the only available format is XML.

Ok, I'll look into writing a binary archiver that assumes that the CPU
architecture on the deserializing end is the same as that on the
serializing end. If it works, maybe Orange is a good choice.

Sounds good. I just hope that the current design allows for a binary
archive. Currently the serializer in Orange assumes that an archive can
deserialize a value based on a key which could be basically anywhere in
the serialized data. This allows at least to implement archives which
store the serialized data in a structured format, e.g. XML, JSON, YAML.
I don't know if that's possible with a binary format, I'm not familiar
with how to implement a binary format.


Yeah, I was trying to wrap my head around the whole "key" concept. I wasn't very successful. I also tried out Orange and filed a few bug reports. It may be that Orange isn't the right tool for the job for MPI, though modulo some bug fixing and polishing it could be extremely useful in different cases with different sets of tradeoffs.

In addition to the bug reports I filed, why is it necessary to write any serialization code to serialize through the base class? What's wrong with just doing something like:

class Base {}
class Derived : Base {}

void main() {
    auto serializer = new Serializer(new XMLArchive!());

    // Introspect Derived and figure out all the details automatically.
    serializer.register!(Derived);
}

Reply via email to