[ 
https://issues.apache.org/jira/browse/CASSANDRA-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3617:
--------------------------------------

       Reviewer: jbellis
    Component/s: Core
       Assignee: Yuki Morishita  (was: Jonathan Ellis)

I've gotten this to pass unit tests and demonstrate that the approach is sound. 
 Patches are up at https://github.com/jbellis/cassandra/tree/3617-4 with 
hopefully meaningful commit messages.

However, to work in a cluster this requires filling in all the 
IVersionedSerializer serializedSize methods that we left unimplemented in the 
past, which we could get away with because MessagingService would serialize to 
a byte[] (Message.body) before passing to OutboundTCPConnection.  Now we do 
need the serializedSize method to work, since we rely on that to avoid having 
to do that extra copy-to-byte[].

(Where we rely on Thrift for message serialization as in 
RangeSliceCommandSerializer we'll need to do a serializer-internal 
copy-to-byte[] in serializedSize, since TSerializer doesn't expose a size 
method.  We can introduce a new version of those serializers in another ticket 
that does not rely on Thrift, but for this ticket let's keep it simple.)

I've started doing that in the last commit posted, but there are more to do and 
I'm out of time for now, so I'm going to hand this off to Yuki.
                
> Clean up and optimize Message
> -----------------------------
>
>                 Key: CASSANDRA-3617
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3617
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Yuki Morishita
>             Fix For: 1.2
>
>
> The Message class has grown largely by accretion and it shows.  There are 
> several problems:
> - Outbound and inbound messages aren't really the same thing and should not 
> be conflated
> - We pre-serialize message bodies to byte[], then copy those bytes onto the 
> Socket buffer, instead of just keeping a reference to the object being 
> serialized and then writing it out directly to the socket
> - MessagingService versioning is poorly encapsulating, scattering version 
> variables and references to things like CachingMessageProducer across the 
> codebase

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to