tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r385649 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: ./ bio/ nio/
Date Mon, 13 Mar 2006 20:14:57 GMT
Author: fhanik
Date: Mon Mar 13 12:14:57 2006
New Revision: 385649

URL: http://svn.apache.org/viewcvs?rev=385649&view=rev
Log:
Removed fast async socket sender, the async logic should not be on the socket level. the same
functionality can very easy be achieved through a interceptor that uses the fast queue or
a tipi on top of the channel.
The channel itself should only do one thing well, send messages, very fast and guaranteed.
if the socket is async, then the error message can never trickle up to the sender, and the
sender will never know that the message failed

Removed:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/FastAsyncSocketSender.java
Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties?rev=385649&r1=385648&r2=385649&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
Mon Mar 13 12:14:57 2006
@@ -3,9 +3,6 @@
 AsyncSocketSender.send.error=Unable to asynchronously send session with id=[{0}] - message
will be ignored.
 AsyncSocketSender.queue.empty=Queue in sender [{0}:{1,number,integer}] returned null element!
 cluster.mbean.register.already=MBean {0} already registered!
-FastAsyncSocketSender.setThreadPriority=[{0}:{1,number,integer}] set priority to {2}
-FastAsyncSocketSender.min.exception=[{0}:{1,number,integer}] new priority {2} < MIN_PRIORITY
-FastAsyncSocketSender.max.exception=[{0}:{1,number,integer}] new priority {2} > MAX_PRIORITY
 IDataSender.ack.eof=EOF reached at local port [{0}:{1,number,integer}]
 IDataSender.ack.receive=Got ACK at local port [{0}:{1,number,integer}]
 IDataSender.ack.missing=Unable to read acknowledgement from [{0}:{1,number,integer}] in {2,number,integer}
ms. Disconnecting socket, and trying again.

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java?rev=385649&r1=385648&r2=385649&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
Mon Mar 13 12:14:57 2006
@@ -77,7 +77,6 @@
      * current sender socket
      */
     private Socket socket = null;
-    private OutputStream socketout = null;
 
     /**
      * is Socket really connected
@@ -474,7 +473,6 @@
         socket.setSendBufferSize(getTxBufSize());
         socket.setReceiveBufferSize(getRxBufSize());
         socket.setSoTimeout((int)timeout);
-        this.socketout = socket.getOutputStream();
     }
 
     /**
@@ -575,8 +573,8 @@
             isMessageTransferStarted = true ;
         }
         try {
-            socketout.write(XByteBuffer.createDataPackage((ClusterData)data));
-            socketout.flush();
+            socket.getOutputStream().write(XByteBuffer.createDataPackage((ClusterData)data));
+            socket.getOutputStream().flush();
             if (getWaitForAck()) waitForAck();
         } finally {
             synchronized(this) {

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml?rev=385649&r1=385648&r2=385649&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
Mon Mar 13 12:14:57 2006
@@ -533,217 +533,6 @@
 				 
   </mbean>
 
- <mbean         name="FastAsyncSocketSender"
-          description="Fast Async Cluster Sender"
-               domain="Catalina"
-                group="IDataSender"
-                 type="org.apache.catalina.cluster.tcp.FastAsyncSocketSender">
-    <attribute   name="info"
-          description="Class version info"
-                 type="java.lang.String"
-                 writeable="false"/>
-    <attribute   name="threadPriority"
-          description="change queue thread priority"
-                 type="int"/>                 
-    <attribute   name="address"
-          description="sender ip address"
-                 type="java.net.InetAddress"
-                 writeable="false"/>
-    <attribute   name="port"
-          description="sender port"
-                 type="int"
-                 writeable="false" />
-    <attribute   name="suspect"
-          description="Socket is gone"
-                 type="boolean"/>
-    <attribute   name="waitForAck"
-          description="Wait for ack after data send"
-			     is="true"
-                 type="boolean"
-                 writeable="false"/>
-    <attribute   name="ackTimeout"
-          description="acknowledge timeout"
-                 type="long"/>
-    <attribute   name="avgMessageSize"
-                 writeable="false"
-          description="avg message size (totalbytes/nrOfRequests"
-                 type="long" />
-    <attribute   name="queueSize"
-                 writeable="false"
-          description="queue size"
-                 type="int"/>
-    <attribute   name="queuedNrOfBytes"
-                 writeable="false"
-          description="number of bytes over all queued messages"
-                 type="long"/>
-    <attribute   name="messageTransferStarted"
-          description="message is in transfer"
-                 type="boolean"
-                 is="true"
-                 writeable="false"/>
-    <attribute   name="keepAliveTimeout"
-          description="active socket keep alive timeout"
-                 type="long"/>
-    <attribute   name="keepAliveMaxRequestCount"
-          description="max request over this socket"
-                 type="int"/>
-    <attribute   name="queueAddWaitTimeout"
-          description="add wait timeout (default 10000 msec)"
-                 type="long"/>
-    <attribute   name="queueRemoveWaitTimeout"
-          description="remove wait timeout (default 30000 msec)"
-                 type="long"/>
-    <attribute   name="maxQueueLength"
-          description="max queue length"
-                 type="int"/>
-    <attribute   name="queueTimeWait"
-          description="remember queue wait times"
-                 is="true"
-                 type="boolean"/>
-    <attribute   name="queueCheckLock"
-          description="check to lost locks"
-                 is="true"
-                 type="boolean"/>
-    <attribute   name="queueDoStats"
-          description="activated queue stats"
-                 is="true"
-                 type="boolean"/>
-    <attribute   name="keepAliveCount"
-          description="keep Alive request count"
-                 type="int"
-                 writeable="false"/>
-    <attribute   name="keepAliveConnectTime"
-          description="Connect time for keep alive"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="resend"
-          description="after send failure make a resend"
-			     is="true"
-                 type="boolean" />
-    <attribute   name="connected"
-                 is="true"
-          description="socket connected"
-                 type="boolean"
-                 writeable="false"/>
-    <attribute   name="nrOfRequests"
-          description="number of send messages to other members"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="totalBytes"
-          description="number of bytes transfered"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="processingTime"
-          description="sending processing time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="minProcessingTime"
-          description="minimal sending processing time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="avgProcessingTime"
-          description="processing time / nrOfRequests"
-                 type="double"
-                 writeable="false"/>
-    <attribute   name="maxProcessingTime"
-          description="maximal sending processing time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="doProcessingStats"
-          description="create Processing time stats"
-			     is="true"
-                 type="boolean" />                 
-    <attribute   name="waitAckTime"
-          description="sending waitAck time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="minWaitAckTime"
-          description="minimal sending waitAck time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="avgWaitAckTime"
-          description="waitAck time / nrOfRequests"
-                 type="double"
-                 writeable="false"/>
-    <attribute   name="maxWaitAckTime"
-          description="maximal sending waitAck time"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="doWaitAckStats"
-          description="create waitAck time stats"
-			     is="true"
-                 type="boolean" />
-    <attribute   name="connectCounter"
-          description="counts connects"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="disconnectCounter"
-          description="counts disconnects"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="socketOpenCounter"
-          description="counts open socket (KeepAlive and connects)"
-                 type="long"
-                 writeable="false"/>				 
-    <attribute   name="socketOpenFailureCounter"
-          description="counts open socket failures"
-                 type="long"
-                 writeable="false"/>                 				 
-    <attribute   name="socketCloseCounter"
-          description="counts closed socket (KeepAlive and disconnects)"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="missingAckCounter"
-          description="counts missing ack"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="dataResendCounter"
-          description="counts data resends"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="dataFailureCounter"
-          description="counts data send failures"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="inQueueCounter"
-          description="counts all queued messages"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="outQueueCounter"
-          description="counts all successfully sended messages"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="queueAddWaitTime"
-          description="queue add wait time (tomcat thread waits)"
-                 type="long"
-                 writeable="false"/>
-    <attribute   name="queueRemoveWaitTime"
-          description="queue remove wait time (queue thread waits)"
-                 type="long"
-                 writeable="false"/>
- 	<operation name="connect"
-               description="connect to other replication node"
-               impact="ACTION"
-               returnType="void">
-    </operation>
-	<operation name="disconnect"
-               description="disconnect to other replication node"
-               impact="ACTION"
-               returnType="void">
-    </operation>
-	<operation name="checkKeepAlive"
-               description="Check connection for close socket"
-               impact="ACTION"
-               returnType="boolean">
-    </operation>
-	<operation name="resetStatistics"
-               description="Reset all statistics"
-               impact="ACTION"
-               returnType="void">
-    </operation>
-				 
-  </mbean>
-
   <mbean         name="MultiSocketSender"
           description="Multi Socket Sender, more than one socket per member"
                domain="Catalina"

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java?rev=385649&r1=385648&r2=385649&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
Mon Mar 13 12:14:57 2006
@@ -43,8 +43,7 @@
     public static final int OPTION_DIRECT_BUFFER = 0x0004;
 
     
-    private static org.apache.commons.logging.Log log =
-        org.apache.commons.logging.LogFactory.getLog( TcpReplicationThread.class );
+    private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
TcpReplicationThread.class );
     private ByteBuffer buffer = null;
     private SelectionKey key;
     private int rxBufSize;

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java?rev=385649&r1=385648&r2=385649&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
Mon Mar 13 12:14:57 2006
@@ -16,10 +16,6 @@
 
 package org.apache.catalina.tribes.tcp.nio;
 
-
-
-
-
 /**
  * @author Filip Hanik
  * @version $Revision: 366253 $ $Date: 2006-01-05 13:30:42 -0600 (Thu, 05 Jan 2006) $



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message