Go to file
Trustin Lee b47fc77522 Add PooledByteBufAllocator + microbenchmark module
This pull request introduces the new default ByteBufAllocator implementation based on jemalloc, with a some differences:

* Minimum possible buffer capacity is 16 (jemalloc: 2)
* Uses binary heap with random branching (jemalloc: red-black tree)
* No thread-local cache yet (jemalloc has thread-local cache)
* Default page size is 8 KiB (jemalloc: 4 KiB)
* Default chunk size is 16 MiB (jemalloc: 2 MiB)
* Cannot allocate a buffer bigger than the chunk size (jemalloc: possible) because we don't have control over memory layout in Java. A user can work around this issue by creating a composite buffer, but it's not always a feasible option. Although 16 MiB is a pretty big default, a user's handler might need to deal with the bounded buffers when the user wants to deal with a large message.

Also, to ensure the new allocator performs good enough, I wrote a microbenchmark for it and made it a dedicated Maven module. It uses Google's Caliper framework to run and publish the test result (example)

Miscellaneous changes:

* Made some ByteBuf implementations public so that those who implements a new allocator can make use of them.
* Added ByteBufAllocator.compositeBuffer() and its variants.
* ByteBufAllocator.ioBuffer() creates a buffer with 0 capacity.
2012-12-13 22:35:06 +09:00
all [maven-release-plugin] prepare for next development iteration 2012-12-03 20:34:05 +01:00
buffer Add PooledByteBufAllocator + microbenchmark module 2012-12-13 22:35:06 +09:00
codec Fix release of buffers in ByteToMessageCodec and MessageToMessageCodec 2012-12-08 12:59:32 +01:00
codec-http #722 - Make WebSocketClientHandshakerFactory a static utility class 2012-12-13 07:34:05 +01:00
codec-socks [#787] Move the socks package to the right place 2012-12-04 09:14:05 +01:00
common [maven-release-plugin] prepare for next development iteration 2012-12-03 20:34:05 +01:00
example #722 - Make WebSocketClientHandshakerFactory a static utility class 2012-12-13 07:34:05 +01:00
handler Replace UnsafeByteBuf with ByteBuf.unsafe() again 2012-12-05 19:28:56 +09:00
license Added webbit license and credits 2011-10-27 10:34:37 +11:00
metrics-yammer [maven-release-plugin] prepare for next development iteration 2012-12-03 20:34:05 +01:00
microbench Add PooledByteBufAllocator + microbenchmark module 2012-12-13 22:35:06 +09:00
tarball [maven-release-plugin] prepare for next development iteration 2012-12-03 20:34:05 +01:00
testsuite Add PooledByteBufAllocator + microbenchmark module 2012-12-13 22:35:06 +09:00
transport Add PooledByteBufAllocator + microbenchmark module 2012-12-13 22:35:06 +09:00
.fbfilter.xml Update license headers 2012-06-04 13:31:44 -07:00
.fbprefs Updated Find Bugs configuration 2009-03-04 10:33:09 +00:00
.gitignore ignore .idea/ folder 2012-01-16 16:01:00 +08:00
LICENSE.txt Relicensed to Apache License v2 2009-08-28 07:15:49 +00:00
NOTICE.txt More copyright updates 2011-12-09 14:28:48 +09:00
pom.xml Add PooledByteBufAllocator + microbenchmark module 2012-12-13 22:35:06 +09:00
README.md Fix README 2012-09-08 20:20:45 +02:00

The Netty Project

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

Getting Netty

    <dependencies>
      ...
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty</artifactId>
        <version>X.Y.Z.Q</version>
        <scope>compile</scope>
      </dependency>
      ...
    </dependencies>

Developer Information

  • Netty is setup to build using Maven

  • You need JDK 7 to build Netty. Netty will run with JDK 5 (3.x) and JDK 6 (4).

  • master branch contains code for Netty 4.x

  • 3 branch contains code for Netty 3.x