Quoting Rickard Öberg <[email protected]>:

That said, if the serializing process is extracted from the runtime, then it would be easy to instantiate a serializer and use streaming serialization instead of producing a String, so that might cover the more advanced cases.

/Rickard

I have developed a language-independent (de)serialization framework, which basically produces almost the same serialization results as Apache Avro [1]. I require this framework for my thesis, and Avro was no good since it can't (de)serialize objects without schema. Of course, this requirement is not important for this usecase with Qi4j entitystores. However, my framework has much better API (IMO) than Avro, and it only concerns serializing, and not implementing whole protocols and whatnots.

For a long time, I had idea of asking Core people to make serialization process customizable, so I could plug in my framework into it. I thought of doing it later this year, but it seems now is the time. However, I am not sure if my framework is yet available for public use, and I will ask around about it and let you know.

I'll give you a little idea of how it would work, in my mind currently. There would be a special EntityTypeSchemaService, which would create a Schema (like in Avro) for each entity type needed. To enable versioning, the entity store would need to have its own meta-section, where the schemas for each version would be kept. So, when the entity store of application version X encounters (in the store) entity of version Y and type Z, it would simply look up in the meta-section the schema for entity type Z of version Y to deserialize it.

As a result, the entities would be serialized very very compactly. Of course, the debugging would be much harder then, since the serialization would be pure binary. However, my framework can be easily extended to produce JSON or XML or some other output.

So, if you're interested, give me a yell and I'll ask around for availability.


[1] http://avro.apache.org/


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to