From 52f73e03ba7f8a5366adc5389973382d0600a2c5 Mon Sep 17 00:00:00 2001 From: fhanik Date: Wed, 11 Oct 2006 23:31:46 +0000 Subject: [PATCH] More documentation, this time for the sender git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@463064 13f79535-47bb-0310-9956-ffa450edef68 --- .../catalina/tribes/transport/AbstractSender.java | 8 ++ webapps/docs/config/cluster-sender.xml | 135 ++++++++++++++++++--- 2 files changed, 123 insertions(+), 20 deletions(-) diff --git a/java/org/apache/catalina/tribes/transport/AbstractSender.java b/java/org/apache/catalina/tribes/transport/AbstractSender.java index 5ffb7caf1..a50920a16 100644 --- a/java/org/apache/catalina/tribes/transport/AbstractSender.java +++ b/java/org/apache/catalina/tribes/transport/AbstractSender.java @@ -171,11 +171,19 @@ public abstract class AbstractSender implements DataSender { public int getMaxRetryAttempts() { return maxRetryAttempts; } + + public void setDirect(boolean direct) { + setDirectBuffer(direct); + } public void setDirectBuffer(boolean directBuffer) { this.directBuffer = directBuffer; } + public boolean getDirect() { + return getDirectBuffer(); + } + public boolean getDirectBuffer() { return this.directBuffer; } diff --git a/webapps/docs/config/cluster-sender.xml b/webapps/docs/config/cluster-sender.xml index fb62569e0..8f76110e6 100644 --- a/webapps/docs/config/cluster-sender.xml +++ b/webapps/docs/config/cluster-sender.xml @@ -15,32 +15,127 @@
+

+ The channel sender component is responsible for delivering outgoing cluster messages over the network. + In the default implementation, org.apache.catalina.tribes.transport.ReplicationTransmitter, + the sender is a fairly empty shell with not much logic around a fairly complex <Transport> + component the implements the actual delivery mechanism. +

+
- - +
+

+ In the default transport implementation, org.apache.catalina.tribes.transport.nio.PooledParallelSender, + Apache Tribes implements what we like to call "Concurrent Parallel Delivery". + This means that we can send a message to more than one destination at the same time(parallel), and + deliver two messages to the same destination at the same time(concurrent). Combine these two and we have + "Concurrent Parallel Delivery". +

+

+ When is this useful? The simplest example we can think of is when part of your code is sending a 10MB message, + like a war file being deployed, and you need to push through a small 10KB message, say a session being replicated, + you don't have to wait for the 10MB message to finish, as a separate thread will push in the small message + transmission at the same time. Currently there is no interrupt, pause or priority mechanism avaiable, but check back soon. +

+
+

+ The nested element <Transport> is is not required, by encouraged, as this is where + you would set all the socket options for the outgoing messages. Please see its attributes below. + There are two implementations, in a similar manner to the receiver, one is non-blocking + based and the other is built using blocking IO.
+ org.apache.catalina.tribes.transport.bio.PooledMultiSender is the blocking implemenation and + org.apache.catalina.tribes.transport.nio.PooledParallelSender. + Parallel delivery is not available for the blocking implementation due to the fact that it is blocking a thread on sending data. +

+
- - - - - - - - - - - - - + + + + Required, only available implementation is org.apache.catalina.tribes.transport.ReplicationTransmitter + + + + + + + Required, an implementation of the org.apache.catalina.tribes.transport.MultiPointSender.
+ Non-blocking implementation is org.apache.catalina.tribes.transport.nio.PooledParallelSender
+ Blocking implementation is org.apache.catalina.tribes.transport.bio.PooledMultiSender +
+ + The receive buffer size on the socket. + Default value is 25188 bytes. + + + The send buffer size on the socket. + Default value is 43800 bytes. + + + Possible values are true or false. + Set to true if you want the receiver to use direct bytebuffers when reading data + from the sockets. Default value is false + + + The number of requests that can go through the socket before the socket is closed, and reopened + for the next request. The default value is -1, which is unlimited. + + + The number of milliseconds a connection is kept open after its been opened. + The default value is -1, which is unlimited. + + + Sets the SO_TIMEOUT option on the socket. The value is in milliseconds and the default value is 3000 + milliseconds. + + + How many times do we retry a failed message, that received a IOException at the socket level. + The default value is 1, meaning we will retry a message that has failed once. + In other words, we will attempt a message send no more than twice. One is the original send, and one is the + maxRetryAttempts. + + + Boolean value for the socket OOBINLINE option. Possible values are true or false. + + + Boolean value for the socket SO_KEEPALIVE option. Possible values are true or false. + + + Boolean value to determine whether to use the SO_LINGER socket option. + Possible values are true or false. Default value is true. + + + Sets the SO_LINGER socket option time value. The value is in seconds. + The default value is 3 seconds. + + + Boolean value for the socket SO_REUSEADDR option. Possible values are true or false. + + + Sets the traffic class level for the socket, the value is between 0 and 255. + Default value is int soTrafficClass = 0x04 | 0x08 | 0x010; + Different values are defined in + java.net.Socket#setTrafficClass(int). + + + Boolean value for the socket TCP_NODELAY option. Possible values are true or false. + The default value is true + +
+
+ + + + The maximum number of concurrent connections from A to B. + The value is based on a per-destination count. + The default value is 25 + + + - -
- - - -- 2.11.0