<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 19 Jan 2012, at 17:36, Galder Zamarreņo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br><br>On Jan 19, 2012, at 3:43 PM, Bela Ban wrote:<br><br><blockquote type="cite">This may not give you any performance increase:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#1 In my experience, serialization is way faster than de-serialization. <br></blockquote><blockquote type="cite">Unless you're doing something fancy in your serializer<br></blockquote><br>No. I think Mircea didn't explain this very well. What really happens here is that when asyncMarshalling is turned on (the name is confusing...), async transport sending is activated. What does this mean?<br><br>When the request needs to be passed onto JGroups, this is done in a separate thread, which indirectly, results in marshalling happening in a different thread.<br><br>This returns faster because we return the control earlier rather than waiting for JGroups to do his thing of marshalling and sending the command and not waiting for response.<br><br>See the use of RpcManagerImpl.asyncExecutor for more info.<font class="Apple-style-span" color="#3d751a"><br></font></div></blockquote>Thanks for the clarification Galder.</div><div>So basically with asyncMarshalling=true (this only works for async x-casts):</div><div>- user thread(1) passes control to marshalling thread(2). At this point user thread returns</div><div>- marshalling thread serialises and builds the Message object then passed control to jgroups thread(3) that sends the response async </div><div><br></div><div>My suggestion is about removing the middle man (2), as this one might reorder messages, and give (3) the responsibility of marshalling by passing in the Object to be marshalled together with the Marshaller itself.</div><div><br></div><div><br></div><div><br></div><div><br><br></div><br></body></html>