Netty 3.1.0.ALPHA2 released - More bells and whistles
Trustin Lee
tlee at redhat.com
Wed Dec 3 20:27:24 EST 2008
Hi folks,
Netty 3.1.0.ALPHA2, the second milestone of the another major feature
release iteration has been released. Please visit our web site to
download it:
* http://www.jboss.org/netty/
As always, your feed back is more than appreciated. Please visit the
discussion forum and leave some comments and questions:
* http://www.jboss.org/netty/community.html
Reliable and Configurable Write Buffer Overflow Prevention
==========================================================
Netty now ships with high and low water mark based write buffer
overflow prevention mechanism, which is much more robust, high-
performing, and configurable. You can configure the high and low
water mark of the write buffer size via NioSocketChannelConfig.
In other words, you have much lower chance of getting OutOfMemoryError
than before!
If the byte unit size of the write buffer exceeds high water mark,
Channel.isWritable() will return false until the byte unit size of
the write buffer goes down under the low water mark. Also,
'channelInterestChanged' event will be fired to notify the status of the
write buffer.
See here for more information: https://jira.jboss.org/jira/browse/NETTY-71
CodecEmbedder
=============
CodecEmbedder (org.jboss.netty.handler.codec.embedder) has been added
to greatly simplify:
* testing Netty encoders and decoders, and
* calling Netty encoders and decoders without setting up mock objects
by yourself, so that they can be used within other codec to build a
multi-layered protocol or even be used to integrate with a non-Netty
application that needs to interoperate with a Netty application.
For the detailed description and examples, please see the following
page: https://jira.jboss.org/jira/browse/NETTY-87
ChannelGroup
============
ChannelGroup (org.jboss.netty.group) allows you to create a set of
Channels and perform a bulk operations on it.
For example, you could add all open Channels to a ChannelGroup and
close all of them before shutting down the service. This will greatly
simplify the service shut down in combination with the
ChannelFactory.releaseExternalResources(), which has been added in
the previous release.
Also, you can broadcast a message to many sessions in just one call, and
can wait for each write request to be done via ChannelGroupFuture.
ChannelGroupFuture also lets you add ChannelGroupFutureListeners just
like you can add ChannelFutureListener to ChannelFuture, and allows you
to determine if the request was completely successful, partially
successful, completely failed. or partially failed.
ChannelLocal
============
I found some users still miss the attribute map of MINA IoSession, and
ChannelLocal is the alternative solution to meet their needs. Using
ChannelLocal, you can add an attribute to Channels more efficiently from
both performance and memory consumption perspective.
The usage of ChannelLocal is very similar to that of ThreadLocal, which
ChannelLocal was named after:
final ChannelLocal<String> myAttr = new ChannelLocal<String>();
...
String a = myAttr.get(channel);
myAttr.set(channel, "newValue");
myAttr.remove(channel);
Please note that Channel always should be specified unlike ThreadLocal,
because there's no elegent way to figure out what the 'current' Channel
is. (In contrast, ThreadLocal uses Thread.currentThread().) Any idea
to improve the usability of ChannelLocal is appreciated.
Upcoming Releases
=================
All features added in this release will be reviewed continuously
following up your feed back. A couple more alpha versions will be
released with more new features and improvements. Please feel free to
browse the road map and let us know what you think about it:
* http://tinyurl.com/5vpxux
Please also note that we are always open to your suggestion and
contribution on any feature which is not listed in the road map yet. :)
Miscellaneous
=============
For the detailed changelog, please visit here:
* http://tinyurl.com/5ua8fj
Again, as always, your feed back is more than appreciated. Please visit
the discussion forum and feel free to leave some comments and questions:
* http://www.jboss.org/netty/community.html
Cheers,
Trustin
--
Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat
--
what we call human nature in actuality is human habit
--
http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/netty-dev/attachments/20081204/cc4d5ef6/attachment.bin
More information about the netty-dev
mailing list