Issue Details (XML | Word | Printable)

Key: DIRMINA-2
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Trustin Lee
Reporter: Trustin Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

Traffic control

Created: 01/Feb/05 10:08 AM   Updated: 29/Nov/05 09:20 AM
Return to search
Component/s: None
Affects Version/s: 0.7.0, 0.8.0
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works traffic-control.diff 2005-11-02 11:35 AM Trustin Lee 7 kB

Resolution Date: 29/Nov/05 09:20 AM


 Description  « Hide
IoSession should have some traffic control methods to throttle traffic.
* IoSession.setTrafficMask( TrafficMask );

TrafficMask is an enumeration type consisted of
* NONE
* READ
* WRITE
* ALL

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee made changes - 01/Feb/05 10:15 AM
Field Original Value New Value
Fix Version/s 0.8 [ 11068 ]
Affects Version/s 0.7 [ 11067 ]
Trustin Lee added a comment - 07/May/05 03:02 PM
Following up new versioning strategy

Trustin Lee made changes - 07/May/05 03:02 PM
Fix Version/s 0.9 [ 11069 ]
Fix Version/s 0.8 [ 11068 ]
Affects Version/s 0.8 [ 11068 ]
Trustin Lee made changes - 02/Sep/05 12:44 AM
Link This issue blocks DIRMINA-85 [ DIRMINA-85 ]
Trustin Lee made changes - 14/Oct/05 01:08 AM
Link This issue blocks DIRMINA-85 [ DIRMINA-85 ]
Trustin Lee made changes - 18/Oct/05 12:34 AM
Description IoSession should have some traffic control methods to throttle traffic.

 * IoSession.suspendRead()
 * IoSession.resumeRead()
 * IoSession.suspendWrite()
 * IoSession.resumeWrite()



IoSession should have some traffic control methods to throttle traffic.

 * IoSession.suspendRead()
 * IoSession.resumeRead()
 * IoSession.suspendWrite()
 * IoSession.resumeWrite()



Fix Version/s 0.9 [ 11069 ]
Fix Version/s 0.9.1 [ 12310371 ]
Environment
Trustin Lee added a comment - 29/Oct/05 12:24 AM
We can rename IdleStatus to IoType and reuse it like this:
* IoSession.suspend( IoType )
* IoSession.resume( IoType )

Repository Revision Date User Message
ASF #330182 Wed Nov 02 03:55:00 UTC 2005 trustin Resolving issue: DIRMINA-2 - Traffic control
* Applied Niklas's patch, but modified it a little bit:
** Added TrafficMask
** Added IoSession.get/setTrafficMask()
* Renamed and reordered methods in SocketIoProcessor to look cleaner

TODO: traffic control for Datagram and VmPipe is not yet done.
Files Changed
MODIFY /directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketConnectorDelegate.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketSessionManagerFilterChain.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/support/VmPipeSessionImpl.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/common/IoSession.java
MODIFY /directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java
MODIFY /directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoSession.java
MODIFY /directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketIoProcessor.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketAcceptorDelegate.java
ADD /directory/network/trunk/src/java/org/apache/mina/common/TrafficMask.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/support/SocketSessionImpl.java

Trustin Lee made changes - 02/Nov/05 11:33 AM
Comment [ This issue depends on DIRMINA-2. ]
Trustin Lee added a comment - 02/Nov/05 11:35 AM
Added a patch by Niklas Therning

Trustin Lee made changes - 02/Nov/05 11:35 AM
Attachment traffic-control.diff [ 12320443 ]
Trustin Lee added a comment - 02/Nov/05 02:15 PM
Updated the issue description following to the recent changes.

Trustin Lee made changes - 02/Nov/05 02:15 PM
Description IoSession should have some traffic control methods to throttle traffic.

 * IoSession.suspendRead()
 * IoSession.resumeRead()
 * IoSession.suspendWrite()
 * IoSession.resumeWrite()



IoSession should have some traffic control methods to throttle traffic.
* IoSession.setTrafficMask( TrafficMask );

TrafficMask is an enumeration type consisted of
* NONE
* READ
* WRITE
* ALL
Repository Revision Date User Message
ASF #330399 Thu Nov 03 00:54:56 UTC 2005 trustin Related issue: DIRMINA-2 Traffic control
* Added convenient shortcut methods for setTrafficMask() as Niklas Therning requested.
Files Changed
MODIFY /directory/network/trunk/src/java/org/apache/mina/common/IoSession.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/common/support/BaseIoSession.java

Niklas Therning added a comment - 29/Nov/05 01:40 AM
Traffic control has now been implemented for all transports and has been checked in to trunk. As far as I can see this issue can now be closed.

NOTE: Traffic control for server side datagram sessions (originating from a DatagramAcceptor) will never happen since a new session is always created when new data is received. However, traffic control for sessions created using the DatagramConnector has been implemented.

Trustin Lee added a comment - 29/Nov/05 02:35 AM
Do you think we need to support the traffic control for server side datagram sessions? I don't see any working solution for this problem. If we cannot support the traffic control for server side daragrams, should we throw an UnsupportedOperationException, or just ignore the request silently?

Trustin Lee made changes - 29/Nov/05 02:35 AM
Fix Version/s 0.9.1 [ 12310371 ]
Fix Version/s 0.9 [ 11069 ]
Trustin Lee added a comment - 29/Nov/05 02:45 AM
I looked into your modification in detail. It looks really good! You did a great job. It was most impressive that you've got rid of VmPipeFilter. :)

Trustin Lee made changes - 29/Nov/05 09:20 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]