Doug,

Let me restate, so you can tell me if I'm wrong.  "Writable is used
instead of Serializable, because it provides for more compact stream
format and allows for easier random access.  They have different
semantics, but don't have a major impact on versioning."

In my experience, using Serialization instead of DataInput/DataOutput
streams has a major impact on versioning.  Serialization keeps a lot
of metadata in the stream.  This makes detecting format changes very
easy, but can really complicate backward compatibility.  Also,
serialization is geared toward preserving the connections of an object
graph, which is behind a lot of the differences you mentioned.

You didn't address the interoperability advantage of using standard
Java classes instead of WritableS.  As I mentioned, while using
serialization would provide this benefit, it isn't necesary for it.
You could provide a mechanism for Writers to be registered for
classes.  So, instead of IntWriteable, users could just use a normal
Integer.  The stream would be byte-for-byte identical to what it is
now, but users could work with standard types.

- Curt

Reply via email to