[infinispan-dev] moving asyncMarshalling to jgroups

Dan Berindei dan.berindei at gmail.com
Thu Jan 19 16:58:27 EST 2012


On Thu, Jan 19, 2012 at 7:46 PM, Mircea Markus <mircea.markus at jboss.com> wrote:
>
> On 19 Jan 2012, at 17:36, Galder Zamarreño wrote:
>
>
>
> On Jan 19, 2012, at 3:43 PM, Bela Ban wrote:
>
> This may not give you any performance increase:
>
>
> #1 In my experience, serialization is way faster than de-serialization.
>
> Unless you're doing something fancy in your serializer
>
>
> 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?
>
> 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.
>
> 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.
>
> See the use of RpcManagerImpl.asyncExecutor for more info.
>
> Thanks for the clarification Galder.
> So basically with asyncMarshalling=true (this only works for async x-casts):
> - user thread(1) passes control to marshalling thread(2). At this point user
> thread returns
> - marshalling thread serialises and builds the Message object then passed
> control to jgroups thread(3) that sends the response async
>

Are you sure about this Mircea? AFAIK the message is always sent by
JGroups from our thread (either the user thread or the async transport
thread). The only difference between sync (GET_ALL) and async calls
(GET_NONE) at the JGroups level is that with GET_NONE that thread
doesn't wait for the response from the target nodes.

Cheers
Dan



More information about the infinispan-dev mailing list