[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1336) Pooling Object Streams
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Thu Jul 31 04:56:26 EDT 2008
[ https://jira.jboss.org/jira/browse/JBCACHE-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12423162#action_12423162 ]
Manik Surtani commented on JBCACHE-1336:
----------------------------------------
FYI: The new streams would be something like:
MarshallableObjectOutputStream, MarshallableObjectInputStream - both of which are resettable (and hence poolable) and which will expose a getBuffer() method which will return a JGroups Buffer object which can be passed directly to JGroups after JGRP-796 is in place.
This will also expose a @Marshallable annotation, and components which are annotated with @Marshallable will have to provide a mandatory magic number. (E.g., @Marshallable (magicNumber = 10))
The streams will then query the magic number, write it to the stream instead of usual class information, and then use the standard readExternal/writeExternal methods to write the contents of the object to the stream.
Objects not annotated with @Marshallable will fall back to JDK serialization.
The streams will not have public constructors, but will have to be created using a MarshallableStreamFactory which could offer pooling support. The MSF would also hold a table of magic numbers, initialized on construction. E.g.,
MarshallableStreamFactory msf = new NonPooledMarshallableStreamFactory(MarshallableClass1.class, MarshallableClass2.class, MarshallableClass3.class);
OR
MarshallableStreamFactory msf = new PooledMarshallableStreamFactory(inStreamPoolSize, outStreamPoolSize, MarshallableClass1.class, MarshallableClass2.class, MarshallableClass3.class);
> Pooling Object Streams
> ----------------------
>
> Key: JBCACHE-1336
> URL: https://jira.jboss.org/jira/browse/JBCACHE-1336
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Mircea Markus
> Assignee: Manik Surtani
> Fix For: 3.0.0.GA
>
>
> ObjectStreams creation consumes a lot of time when it comes to marshalling commands (e.g. > 5% of total command in case of put is in building the ObjectStream).
> Pooling them would be an important performance enhancement.
> We cannot pool the ones from JDK as these cache .class information which results in memory leakage.
> Investigate the possibility of implementing own alternative ObjectStreams which would be pool-able.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list