dev@shoal.java.net

Re: question concerning abstract transport branch MessageImpl.MAX_TOTAL_MESSAGE_LENGTH

From: Bongjae Chang <bongjae.chang_at_gmail.com>
Date: Wed, 10 Mar 2010 13:53:37 +0900

Hi Joe,

I agree that the size is small.

Actually, I couldn't determine the default size(8k was maybe temporary size). :-)

So I just set the default to Socket's send(receive) buffer size.

i.g. Socket#getSendBufferSize(), Socket#getReceiveBufferSize(), DatagramSocket#getReceiveBufferSize(), DatagramSocket#getSendBufferSize() and ServerSocket#getReceiveBufferSize() were 8k.

So I also think that you had better change the current constant value.

But you should consider the default allocation size of DatagramPacket in BlockingIOMulticastSender.java. The default allocation size is about 16k.

So I think that maybe you should also change the default allocation size in BlockingIOMulticastSender.java if you will change MessageImpl.MAX_TOTAL_MESSAGE_LENGTH.

In addition, I think that it is also better that BlockingIOMulticastSender.java considers MulticastSocket#setSendBufferSize() or #setReceiveBufferSize() APIs.(But I don't know how it has the advantage of efficiency because I didn't have tests of those APIs).

Thanks.


Regards,
Bongjae Chang


----- Original Message -----
From: "Joseph Fialli" <joe.fialli_at_oracle.com>
To: <bongjae.chang_at_gmail.com>
Cc: <dev_at_shoal.dev.java.net>
Sent: Wednesday, March 10, 2010 1:10 AM
Subject: question concerning abstract transport branch MessageImpl.MAX_TOTAL_MESSAGE_LENGTH


> Bongjae,
>
> We have found that the default MessageImpl.MAX_TOTAL_MESSAGE_LENGTH is
> set to a rather modest size of 8K.
> This size is small for a particular use case we have in mind. I was
> looking to seek your advice on the advantages
> of having the default size so small.
>
> I was considering the following options:
>
> 1. Change the current constant value from 8192 to 64K. // requiring
> the least amount of change by potentially having a negative unforeseen
> impact.
>
> 2. Leave the default as is but make this constant configurable via a
> Shoal property that is specified when gms client joins group.
>
> Before I started working on this change, I wanted to understand the
> motivation behind the current value.
>
> Thanks in advance for your comments.
>
> -Joe
>
>