[jboss-jira] [JBoss JIRA] (JGRP-2475) RpcDispatcher: use ObjectMessage

Bela Ban (Jira) issues at jboss.org
Fri May 8 05:39:00 EDT 2020


Bela Ban created JGRP-2475:
------------------------------

             Summary: RpcDispatcher: use ObjectMessage
                 Key: JGRP-2475
                 URL: https://issues.redhat.com/browse/JGRP-2475
             Project: JGroups
          Issue Type: Enhancement
            Reporter: Bela Ban
            Assignee: Bela Ban
             Fix For: 5.0.0.Beta2


When invoking RPCs, {{RpcDispatcher}} converts the {{MethodCall}} used into a byte array and passes that to a {{BytesMessage}} that's then sent down to the transport.

This is inefficient, as an unneeded byte array allocation is done, both when an RPC request is sent and when the response is sent.

Instead of doing eager marshalling of {{MethodCall}} into a byte array, pass the {{MethodCall}} to an {{ObjectMessage}}, which marshalls the latter directly to the output stream of the transport at send time.

This eliminates 2 memory allocations per RPC round-trip (on a sync RPC).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list