dev@grizzly.java.net

moving to grizzly 2.x

From: Tigran Mkrtchyan <tigran.mkrtchyan_at_desy.de>
Date: Thu, 29 Sep 2011 10:48:37 +0200

Hi,

we started to evaluate migration of our code from 1.9.x to 2.x.
While new filter implementation looks like more natural some
low-level functionality get lost or become more difficult to use.


in org.glassfish.grizzly.SocketBinder

   bind(String host, PortRange portRange, int backlog)

takes String hostname as argument. This makes impossible to bind to any
interface. InetAddress instead of String will probably more useful.

We run our service on tcp and udp connections at the same time.
with grizzly 1.9 it's easy to do:


final Controller controller = new Controller();
...
controller.addSelectorHandler(udp_handler);
controller.addSelectorHandler(tcp_handler);
...
controller.start();

I cant find any similar way in 2.x.

org.glassfish.grizzly.Transport does not have a reliable way to
find out underling protocol ( well, instanceof is not a best way to go).

I am ready to contribute fixes.

Ok, enough complains. Now a question:

if I did not get complete message in handleRead(FilterChainContext ctx)
will grizzly append incoming bytes to the existing bytes and extend
internal buffer if required?


And the last point - it looks like I got a 10% performance increase with
2.1.3 over 1.9.19.

Thanks,
   Tigran.