Go to file
fbregier bc1379d19d [#2721] Improve Traffic Shaping handler
Motivation:
Currently Traffic Shaping is using 1 timer only and could lead to
"partial" wrong bandwidth computation when "short" time occurs between
adding used bytes and when the TrafficCounter updates itself and finally
when the traffic is computed.
Indeed, the TrafficCounter is updated every x delay and it is at the
same time saved into "lastXxxxBytes" and set to 0. Therefore, when one
request the counter, it first updates the TrafficCounter with the added
used bytes. If this value is set just before the TrafficCounter is
updated, then the bandwidth computation will use the TrafficCounter with
a "0" value (this value being reset once the delay occurs). Therefore,
the traffic shaping computation is wrong in rare cases.

Secondly the traffic shapping should avoid if possible the "Timeout"
effect by not stopping reading or writing more than a maxTime, this
maxTime being less than the TimeOut limit.

Thirdly the traffic shapping in read had an issue since the readOp
was not set but should, turning in no read blocking from socket
point of view.

Modifications:
The TrafficCounter has 2 new methods that compute the time to wait
according to read or write) using in priority the currentXxxxBytes (as
before), but could used (if current is at 0) the lastXxxxxBytes, and
therefore having more chance to take into account the real traffic.

Moreover the Handler could change the default "max time to wait", which
is by default set to half of "standard" Time Out (30s:2 = 15s).

Finally we add the setAutoRead(boolean) accordingly to the situation,
as proposed in #2696 (this pull request is in error for unknown reason).

Result:
The Traffic Shaping is better take into account (no 0 value when it
shouldn't) and it tries to not block traffic more than Time Out event.

Moreover the read is really stopped from socket point of view.

This version is similar to #2388 and #2450.
This version is for V4.1, and includes the #2696 pull request
to ease the merge process.
It is compatible with master too.

Including also #2748

The test minimizes time check by reducing to 66ms steps (55s).
2014-08-13 01:40:32 +02:00
all [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
buffer Port ChannelOutboundBuffer and related changes from 4.0 2014-08-05 15:00:45 +02:00
codec Implemented FastLZ compression codec 2014-08-12 15:14:59 -07:00
codec-dns Fix buffer leaks in DnsResponseDecoder and DnsResponseDecoderTest 2014-08-04 14:06:45 +02:00
codec-haproxy Fix NPE problems 2014-07-20 12:55:22 +02:00
codec-http SPDY: fix SpdySessionHandler::updateSendWindowSize 2014-08-11 11:21:24 +02:00
codec-memcache [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
codec-mqtt Fix NPE problems 2014-07-20 12:55:22 +02:00
codec-socks [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
codec-stomp Fix a resource leak in StompSubframeAggregatorTest 2014-08-11 10:46:43 -07:00
common [#2744] Fix flakey HashedWheelTimerTest.testExecutionOnTime() 2014-08-06 07:03:31 +02:00
example Move generic code to HttpOrSpdyChooser to simplify implementations 2014-07-07 09:37:10 +02:00
handler [#2721] Improve Traffic Shaping handler 2014-08-13 01:40:32 +02:00
license Implemented FastLZ compression codec 2014-08-12 15:14:59 -07:00
microbench [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
tarball [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
testsuite [#2721] Improve Traffic Shaping handler 2014-08-13 01:40:32 +02:00
transport Allow to obtain RecvByteBufAllocator.Handle to allow more flexible implementations 2014-08-12 06:53:57 +02:00
transport-native-epoll Allow to obtain RecvByteBufAllocator.Handle to allow more flexible implementations 2014-08-12 06:53:57 +02:00
transport-rxtx [maven-release-plugin] prepare for next development iteration 2014-07-04 17:26:02 +09:00
transport-sctp Allow to obtain RecvByteBufAllocator.Handle to allow more flexible implementations 2014-08-12 06:53:57 +02:00
transport-udt Port ChannelOutboundBuffer and related changes from 4.0 2014-08-05 15:00:45 +02:00
.fbprefs Updated Find Bugs configuration 2009-03-04 10:33:09 +00:00
.gitignore Add JVM crash logs to .gitignore 2014-05-18 21:36:54 +09:00
.travis.yml Travis CI branch whitelisting 2013-03-11 09:55:43 +09:00
CONTRIBUTING.md Move the pull request guide to the developer guide 2014-03-12 13:13:58 +09:00
LICENSE.txt Relicensed to Apache License v2 2009-08-28 07:15:49 +00:00
NOTICE.txt Implemented FastLZ compression codec 2014-08-12 15:14:59 -07:00
pom.xml Implemented LZF compression codec 2014-07-17 07:18:07 +02:00
README.md Add a link to the 'native transports' page 2014-07-21 12:54:24 -07:00
run-example.sh Overall refactoring of the STOMP codec 2014-06-04 17:09:42 +09:00

Netty Project

Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.

How to build

For the detailed information about building and developing Netty, please visit the developer guide. This page only gives very basic information.

You require the following to build Netty:

Note that this is build-time requirement. JDK 5 (for 3.x) or 6 (for 4.0+) is enough to run your Netty-based application.

Branches to look

The 'master' branch is where the development of the latest major version lives on. The development of all other versions takes place in each branch whose name is identical to <majorVersion>.<minorVersion>. For example, the development of 3.9 and 4.0 resides in the branch '3.9' and the branch '4.0' respectively.