Archived

This forum has been archived. Please start a new discussion on GitHub.

One-way communication buffer overflow?

Hello again,

It has been a while, but that is good. We really love Ice and have been using it successfully for a couple of years.

My question is theorectical. We have been using Ice to pump data from a C++ to Java service. The C++ service is always on Unix; the Java on Unix or Windows. Occasionally, our C++ process will block when sending the data. Although we are now investigating specifics, we were wondering what happens if when using one-way protocol, the local transport, as described in your manual below, fills its buffer -- i.e. will this cause the client to block until the buffer has more room?

"For a oneway invocation, the client-side run time hands
the invocation to the local transport, and the invocation completes on the client
side as soon as the local transport has buffered the invocation. The actual invocation
is then sent asynchronously by the operating system."

Thanks for any help,

Brian

Comments

  • bernard
    bernard Jupiter, FL
    Hi Brian,

    This is correct, a client sending oneways can block when its TCP/IP buffer becomes full. See the FAQ in Connections 2 .

    This typically occurs when the server can't keep up with the client: all its threads are busy and it does not pick up quickly enough messages from the client.

    Cheers,
    Bernard
  • Thanks for the quick reply Bernard.

    I know that Ice provides the MaxMessageSize property, but is there an interface for setting the underlying TCP/IP socket buffer size -- e.g if we wanted to increase it?

    Do you know the default sizes for Unix and Windows?

    What are the implications of increasing this buffer size?

    Feel free to direct me to other sources of info as you did below.

    Thanks again,

    Brian
    bernard wrote:
    Hi Brian,

    This is correct, a client sending oneways can block when its TCP/IP buffer becomes full. See the FAQ in Connections 2 .

    This typically occurs when the server can't keep up with the client: all its threads are busy and it does not pick up quickly enough messages from the client.

    Cheers,
    Bernard
  • bernard
    bernard Jupiter, FL
    Hi Brian,

    Ice does not provide any configuration variable to set the size of its TCP/IP buffers. But it would make sense to add one.

    We use 64K on Windows, the default on other platforms.

    Cheers,
    Bernard
  • Thanks for your help, Bernard. Appreciate it.

    Brian