[jboss-dev-forums] [Design of JBossCache] - Re: Common marshalling infrastructure

manik.surtani@jboss.com do-not-reply at jboss.com
Wed Aug 6 11:11:18 EDT 2008


Looks good and well thought out.  A couple of questions:

* ByteInput and ByteOutput - could they be compatible with org.jboss.cache.io.ByteBuffer?  Essentially this class is an extension of org.jgroups.util.Buffer, which provides direct access to a byte array.  I'd hate to have to copy things around to use these new interfaces.

* StreamHeader is useful for me since I need to add version bits to the stream such that the receiving end can use the appropriate marshaller implementation based on the version.  

* How are ObjectMarshallers selected?  Based on the class info from the ClassMarshaller?  Could this be ClassMarshaller + some token from the StreamHeader? (see previous point for reason why)

* Pooling MOIS and MOOS - probably will have to happen due to the cost of constructing these, and if they are reused, why would you discard the Object and Cache Marshallers from the Marshaller? 

* Reference counting.  Do you propose any sort of ref counting, if I were to write the same instance to the stream multiple times?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169077#4169077

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169077



More information about the jboss-dev-forums mailing list