2013-03-25 08:05:19 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2013-02-01 12:51:50 +01:00
|
|
|
<!--
|
|
|
|
~ Copyright 2013 The Netty Project
|
|
|
|
~
|
|
|
|
~ The Netty Project licenses this file to you under the Apache License,
|
|
|
|
~ version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
~ with the License. You may obtain a copy of the License at:
|
|
|
|
~
|
|
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
~
|
|
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
|
|
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
~ License for the specific language governing permissions and limitations
|
|
|
|
~ under the License.
|
|
|
|
-->
|
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
|
|
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-02-01 12:51:50 +01:00
|
|
|
<parent>
|
|
|
|
<groupId>io.netty</groupId>
|
2013-02-14 20:27:26 +01:00
|
|
|
<artifactId>netty-testsuite-osgi-parent</artifactId>
|
Revamp the core API to reduce memory footprint and consumption
The API changes made so far turned out to increase the memory footprint
and consumption while our intention was actually decreasing them.
Memory consumption issue:
When there are many connections which does not exchange data frequently,
the old Netty 4 API spent a lot more memory than 3 because it always
allocates per-handler buffer for each connection unless otherwise
explicitly stated by a user. In a usual real world load, a client
doesn't always send requests without pausing, so the idea of having a
buffer whose life cycle if bound to the life cycle of a connection
didn't work as expected.
Memory footprint issue:
The old Netty 4 API decreased overall memory footprint by a great deal
in many cases. It was mainly because the old Netty 4 API did not
allocate a new buffer and event object for each read. Instead, it
created a new buffer for each handler in a pipeline. This works pretty
well as long as the number of handlers in a pipeline is only a few.
However, for a highly modular application with many handlers which
handles connections which lasts for relatively short period, it actually
makes the memory footprint issue much worse.
Changes:
All in all, this is about retaining all the good changes we made in 4 so
far such as better thread model and going back to the way how we dealt
with message events in 3.
To fix the memory consumption/footprint issue mentioned above, we made a
hard decision to break the backward compatibility again with the
following changes:
- Remove MessageBuf
- Merge Buf into ByteBuf
- Merge ChannelInboundByte/MessageHandler and ChannelStateHandler into ChannelInboundHandler
- Similar changes were made to the adapter classes
- Merge ChannelOutboundByte/MessageHandler and ChannelOperationHandler into ChannelOutboundHandler
- Similar changes were made to the adapter classes
- Introduce MessageList which is similar to `MessageEvent` in Netty 3
- Replace inboundBufferUpdated(ctx) with messageReceived(ctx, MessageList)
- Replace flush(ctx, promise) with write(ctx, MessageList, promise)
- Remove ByteToByteEncoder/Decoder/Codec
- Replaced by MessageToByteEncoder<ByteBuf>, ByteToMessageDecoder<ByteBuf>, and ByteMessageCodec<ByteBuf>
- Merge EmbeddedByteChannel and EmbeddedMessageChannel into EmbeddedChannel
- Add SimpleChannelInboundHandler which is sometimes more useful than
ChannelInboundHandlerAdapter
- Bring back Channel.isWritable() from Netty 3
- Add ChannelInboundHandler.channelWritabilityChanges() event
- Add RecvByteBufAllocator configuration property
- Similar to ReceiveBufferSizePredictor in Netty 3
- Some existing configuration properties such as
DatagramChannelConfig.receivePacketSize is gone now.
- Remove suspend/resumeIntermediaryDeallocation() in ByteBuf
This change would have been impossible without @normanmaurer's help. He
fixed, ported, and improved many parts of the changes.
2013-05-28 13:40:19 +02:00
|
|
|
<version>4.0.0.CR4-SNAPSHOT</version>
|
2013-02-01 12:51:50 +01:00
|
|
|
</parent>
|
|
|
|
|
2013-02-14 20:27:26 +01:00
|
|
|
<artifactId>netty-testsuite-osgi-deps</artifactId>
|
2013-05-01 17:20:18 +02:00
|
|
|
<packaging>bundle</packaging>
|
2013-02-01 12:51:50 +01:00
|
|
|
|
2013-02-14 20:27:26 +01:00
|
|
|
<name>Netty/Testsuite/OSGi/Deps</name>
|
2013-02-01 12:51:50 +01:00
|
|
|
<description>verify osgi compliance: all transitive dependencies must be osgi bundles</description>
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
<!-- MAIN -->
|
2013-05-01 17:20:18 +02:00
|
|
|
<!-- Include all Netty OSGI bundle release modules. -->
|
2013-02-01 12:51:50 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-buffer</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-codec</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-codec-http</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-codec-socks</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-handler</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<!--
|
|
|
|
* DO NOT install netty-transport-rxtx bundle due to rxtx depencency:
|
|
|
|
*
|
|
|
|
* 1) rxtx does not have automatic native library loader
|
|
|
|
* 2) rxtx does not have osgi bundle
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport-rxtx</artifactId>
|
|
|
|
<version>${project.version}</version>
|
2013-02-01 12:51:50 +01:00
|
|
|
</dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
-->
|
2013-02-01 12:51:50 +01:00
|
|
|
<dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport-sctp</artifactId>
|
|
|
|
<version>${project.version}</version>
|
2013-02-01 12:51:50 +01:00
|
|
|
</dependency>
|
|
|
|
<dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport-udt</artifactId>
|
|
|
|
<version>${project.version}</version>
|
2013-02-01 12:51:50 +01:00
|
|
|
</dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-02-01 12:51:50 +01:00
|
|
|
<!-- TEST -->
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-05-01 17:20:18 +02:00
|
|
|
<!-- File/text conversion utilities. -->
|
2013-02-01 12:51:50 +01:00
|
|
|
<dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
<groupId>commons-io</groupId>
|
|
|
|
<artifactId>commons-io</artifactId>
|
|
|
|
<version>1.3.2</version>
|
|
|
|
<scope>test</scope>
|
2013-02-01 12:51:50 +01:00
|
|
|
</dependency>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-02-01 12:51:50 +01:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-05-01 17:20:18 +02:00
|
|
|
<!-- Produce Karaf feature.xml -->
|
2013-02-01 12:51:50 +01:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.karaf.tooling</groupId>
|
|
|
|
<artifactId>karaf-maven-plugin</artifactId>
|
2013-03-19 07:56:20 +01:00
|
|
|
<version>3.0.0.RC1</version>
|
2013-02-01 12:51:50 +01:00
|
|
|
<extensions>true</extensions>
|
2013-05-01 17:20:18 +02:00
|
|
|
<executions>
|
2013-05-01 17:37:02 +02:00
|
|
|
<execution>
|
|
|
|
<goals>
|
|
|
|
<goal>features-generate-descriptor</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
2013-05-01 17:20:18 +02:00
|
|
|
</executions>
|
2013-02-01 12:51:50 +01:00
|
|
|
</plugin>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-05-01 17:20:18 +02:00
|
|
|
<!-- Invoke integration tests. -->
|
2013-02-01 12:51:50 +01:00
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
2013-03-19 08:48:53 +01:00
|
|
|
<phase>test</phase>
|
2013-02-01 12:51:50 +01:00
|
|
|
<goals>
|
|
|
|
<goal>integration-test</goal>
|
|
|
|
<goal>verify</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-05-01 17:20:18 +02:00
|
|
|
<!-- Do not deploy this artifact. -->
|
2013-02-01 12:51:50 +01:00
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<skip>true</skip>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-02-01 12:51:50 +01:00
|
|
|
</plugins>
|
2013-02-14 21:21:30 +01:00
|
|
|
|
2013-02-01 12:51:50 +01:00
|
|
|
<pluginManagement>
|
2013-02-14 21:21:30 +01:00
|
|
|
<plugins>
|
|
|
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.eclipse.m2e</groupId>
|
|
|
|
<artifactId>lifecycle-mapping</artifactId>
|
|
|
|
<version>1.0.0</version>
|
|
|
|
<configuration>
|
|
|
|
<lifecycleMappingMetadata>
|
|
|
|
<pluginExecutions>
|
|
|
|
<pluginExecution>
|
|
|
|
<pluginExecutionFilter>
|
|
|
|
<groupId>org.apache.karaf.tooling</groupId>
|
|
|
|
<artifactId>karaf-maven-plugin</artifactId>
|
|
|
|
<versionRange>[0,)</versionRange>
|
|
|
|
<goals>
|
|
|
|
<goal>features-generate-descriptor</goal>
|
|
|
|
</goals>
|
|
|
|
</pluginExecutionFilter>
|
|
|
|
<action>
|
|
|
|
<execute />
|
|
|
|
</action>
|
|
|
|
</pluginExecution>
|
|
|
|
</pluginExecutions>
|
|
|
|
</lifecycleMappingMetadata>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
2013-02-01 12:51:50 +01:00
|
|
|
</pluginManagement>
|
|
|
|
</build>
|
|
|
|
</project>
|
2013-05-01 17:37:02 +02:00
|
|
|
|