Tuesday Aug 31, 2010

Grizzly 2.0.0 release candidate 1 is now available!

From the announcement on the mailing list:

The Grizzly Team would like to announce the release of Grizzly 2.0 RC1 (release candidate).   This goal of this release was a stable core and solid API.  While this is a significant step to getting Grizzly 2.0 finalized, we still have work to do in the area of documentation, performance, and resolving any feedback solicited by this release.

The bits are available on our maven repository under the group ID com.sun.grizzly, versioned 2.0.0-RC1.

Here's some info on the artifacts that are currently available:

  • framework (artifact ID: grizzly-framework) : The core Grizzly runtime.
  • http (artifact ID: grizzly-http) : HTTP protocol implementation, which contains HTTP Filters and utility classes to work with HTTP artifacts.
  • webcontainer (artifact ID: grizzly-webcontainer) :  Lightweight Grizzly web server implementation, which provides high level abstractions based on the entities provided by the HTTP module. While the concept is similar to the Grizzly 1.x web server, it does expand this abstraction idea by providing an API for non-blocking streams to read/write application content.
  • websockets (artifact ID: grizzly-websockets) : Web Sockets implementation based on http module.

There are several samples available that demonstrate all of these modules in action.

  • Core framework samples [1], [2], [3], [4].
  • HTTP protocol framework sample [5]
  • Webcontainer samples using non-blocking streams [6], [7]
  • Web Socket samples [8]

We're looking forward to hearing back from the community about their experiences using this release (either good or bad).  Feel free to start a discussion on the grizzly mailing lists or send us an issue report.

Thursday Aug 12, 2010

Grizzly 2.0 now has JMX support.

So, it's been some time since I've last blogged.  Several changes have occurred since then.  One of these changes is my move from the Mojarra to the Grizzly project.

The team has been hard at work getting Grizzly 2.0 into shape, and it's coming along nicely.  The latest feature we've added is support for JMX monitoring.

Enabling JMX Support

Grizzly 2.0 JMX support is enabled through another related project called "gmbal" (pronounced "gumball").  This project allowed us to take the grunt work out of working with JMX via JDK5 annotations.   If a project has JMX requirements, it simply needs to add a maven dependency with the group id of org.glassfish.gmbal and artifact id gmbal.

Once the dependency has been included in the project, it's very simple to enable monitoring:

Giving the JMX Monitoring a Test Drive

Using the code snippet above, with the server running, connect to the server using JConsole:

Select the process of your java application and click Connect.  Once connected, select the MBeans tab and expand the com.sun.grizzly root.

So, what do these MBeans represent?

  • The DefaultMemoryManager provides details on the memory managed subsystem introduced in Grizzly 2.0.  There will be one DefaultMemoryManager per Transport.
  • FileCache provides details on the static file caching mechanism that may be enabled on a per-Transport basis.
  • GrizzlyListener is an abstraction around the Grizzly 2.0 Transport.  This provides details on the listener configuration (i.e., port, network host, secure, etc.).
  • GrizzWebServer is the root of the JMX hierarchy.
  • HttpCodecFilter monitors statistics related to HTTP protocol parsing/encoding.
  • TCPNIOTransport is the concrete Transport implementation used by a GrizzlyListener.  There will be one transport per GrizzlyListener instance.
  • ThreadPool provides details on the threads being used by the GrizzlyWebServer.  Note that this pool is shared by all Transports, however, JConsole
    may show more than one thread pool as being available.
  • WebServerFilter provides details on the higher level HTTP server processing (i.e., how many requests have been serviced, how may responses
    are current suspended, etc.)

I've included some examples of some of the monitoring statistics that are available after making several requests to the server:

ThreadPool

HTTP Codec Filter

Web Server Filter

Memory Manager

If anyone decides to give this a shot and and has ideas to offer on improving monitoring support or if you find a problem, please feel free to log a request on the project issue tracker, or join the user mailing list and start a discussion with your ideas. 

    About

    user12615560

    Search

    Categories
    Archives
    « August 2010 »
    SunMonTueWedThuFriSat
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
        
           
    Today