dev@glassfish.java.net

Grizzly patch. (fwd)

From: Vicenc Beltran Querol <vbeltran_at_ac.upc.edu>
Date: Fri, 1 Jul 2005 17:28:19 +0200

Hi,

the attachment.

Vicenç



----- Forwarded message from Vicenc Beltran Querol <vbeltran_at_ac.upc.edu> -----

Subject: Grizzly patch.
Date: Fri, 1 Jul 2005 17:04:52 +0200
From: Vicenc Beltran Querol <vbeltran_at_ac.upc.edu>
To: dev_at_glassfish.dev.java.net


Hi,

attached you'll find a patch for Grizzly, that changes the coyote multithreading
model to a "hybrid" threading model (NIO+Mulithread). It's fully
compatible with the existing Catalina code and is SSL enabled.

Like Grizzly, the Hybrid model breaks the limitation of one thread per connection,
thus you can have a higher number of concurrent users with a lower number of threads.
NIO selectors are utilized to detect when a user connection becomes active
( i.e. there is a user http request available to be read), and then, one thread
processes the connection as usual, but without blocking on the read() operation
because we know that there is one available request.


The Hybrid model eliminates the need to close inactive connections (especially
important under high load or SSL load) and reduces the number of necessary threads.

The major difference between Grizzly and Hybrid approaches is that Grizzly does
the read of the request in non-blocking mode so it can deal with lot of large uploads,
but the Hybrid supports SSL connections.



To enable the hybrid implementation add the following "jvm-option":
 
./glassfish/domains/domain1/config/domain.xml
<java-config ...
  ...
  <jvm-options>-Dcom.sun.enterprise.web.connector.useHybridConnector=true</jvm-options>
  ...
</java-config>


Best Regards,

Vicenç Beltran

eDragon Research Group
Barcelona Supercomputing Center (BSC)
http://www.bsc.es/edragon

----- End forwarded message -----